Grokking LinkedIn Coding Interview
Ask Author
Back to course home

0% completed

Vote For New Content
I think the result should be usable, whereas for example in JS the result is onl...

seth

Jan 9, 2022

I think the result should be usable, whereas for example in JS the result is only usable as a string, since it can't be reasonably processed as an array due to integer keys.

Using an array of objects like [{2:5}, {1:4}, {7:9}] etc for i/o, a simple 15 line function without a helper class is sufficient, and the result allows for further processing.

0

0

Comments
Comments
S
seth 4 years ago

went to delete this wrong comment, but it was too late ;)

On this page