Program is to find the most frequently used words across all the input files, where each word must appear at least once in each file.
How can this be achieved? I am new to java and yet to dig things deep. So trying through such programs.
Anamika15
0
Newbie Poster
Recommended Answers
Jump to PostI think Anamika's original algorithm is a lot simpler (see step c).
Jump to PostWhy do you think anything has to be read twice unless you mean to say that reading the hashmap created out of the file is the same as "reading the data twice".
Yes, you could say that too :) It is just less data after the whole data …
Jump to Posta word 'blah' found in the first iteration, so it is added. The second file doesn't have it, so it is removed. Then the third file has it, so it is added again.
No, that's not the algorithm I posted. You never add any words to the master …
Jump to PostAh ok, got your algorithm. Sorry. :)
Jump to PostNot mine, Anamika's. Credit where credit is due...
J
All 18 Replies
Slavi
94
Master Poster
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
jwenting
1,889
duckman
Team Colleague
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Anamika15
0
Newbie Poster
iamthwee
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Taywin
312
Posting Virtuoso
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Taywin
312
Posting Virtuoso
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Taywin
312
Posting Virtuoso
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Taywin
312
Posting Virtuoso
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Taywin
312
Posting Virtuoso
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.