Win a copy of Rust Web Development this week in the Other Languages forum!

James Joe

Greenhorn
+ Follow
since Feb 27, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by James Joe

Thank you Campbell Ritchie. But the constraint here is that the CSV parsing has to be done without using third party libraries.
I have the following so far, but I think I am not heading the right way. The csv parsing is turning out to be very messy and complicated:

Any suggestion with the CSV parsing to fit the solution? I have reached a dead end!

7 years ago
Hi,

I am breaking my head on this problem to find a suitable data type to use, but I am not able to settle with which one would be the most efficient and simple way to program this without using any third party libraries:

Problem:
Consider Share prices for a N number of companies given for each month since year 1990 in a CSV file. Format of the file is as below with first line as header.

Year,Month,Company A, Company B,Company C, .............Company N
1990, Jan, 10, 15, 20, , ..........,50
1990, Feb, 10, 15, 20, , ..........,50
.
.
.
.
2013, Sep, 50, 10, 15............500

Output:
List for each Company year and month in which the share price was highest.

I've considered using trees, Hashmap, Lists but I am unable to finalise THE ONE solution. I am a newbie to Java with a couple of weeks of Java coding experience so far. Any help in the form of pseudo code, program or what data type to use is appreciated.
7 years ago