Created
March 12, 2014 04:34
-
-
Save mikeymicrophone/9500928 to your computer and use it in GitHub Desktop.
pseudo code for finding the artist who has released into/within the most genres
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
artists = all artists | |
for each artist | |
grab all tracks by artist | |
grab all genres for tracks | |
count number of unique genres | |
note the number of genres for the artist | |
start with the first artist | |
compare her number of genres with the number of genres for the second artist | |
whoever has more is the leader | |
for each subsequent artist | |
compare her number of genres with the leader | |
whoever has more is the leader | |
the leader is the artist who has the most genres |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Sandbar check this out