• Post Reply Bookmark Topic Watch Topic
  • New Topic

algorithm for finding best search from list of artist  RSS feed

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a text file contains the favorite musical artists of 1000 users from LastFM. Each line is a list of up to 50 artists, formatted as follows:

Radiohead,Pulp,Morrissey,Delays,Stereophonics,Blur,Suede,Sleeper,The La's,Super Furry Animals\n
Band of Horses,Iggy Pop,The Velvet Underground,Radiohead,The Decemberists,Morrissey,Television\n
etc.

I wants to Write a program using this file as input, produces an output file containing a list of pairs of artists which appear TOGETHER in at least fifty different lists. For example, in the above sample, Radiohead and Morrissey appear together twice, but every other pair appears only once.

I have no idea which will be best way for this. Just needs guidance for finding solution for this. Thanks.

 
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The standard reply to "How do I do this" is:

1) turn off your computer
2) get paper, pencils, and erasers
3) Play around with it until you figure out how to do it using the above tools
4) Write down those steps in English (or any other natural language)
5) revise those steps until a 10 year old child can understand and follow them.

Only when the above is done should you consider writing a single line of java.
 
apurv suthar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply. Really appreciate it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!