You are viewing a single comment's thread. Return to all comments →
Come on guys =) why you think of it as the fewer lines or seconds you spent — you reach the better solution? This challenge is about fundamental computer science techniques, google about Sparse Arrays and make a decision why this challenge is named so (this is not without purpose). Believe me it's interesting and valuable =) HashMap is the right pill here and of course we would hardly find any programming language not giving HashMaps out of the box. But how HashMaps actually work under the hoods? Go through this!
My thoughts indeed
It's a nice thought but I wish it had been approached like e.g. the Insertion Sort series, where the challenges steer you towards the correct solution rather than setting a problem with no reference to the subject except the title
Can you tell how to use sparse arrays for this problem?