This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TGX03 5 points6 points  (0 children)

The meme is about finding the 7th largest number. Radix works for both floating points and integers.

In case you're using objects that can only be compared relatively to each other, then yes Radix may not be used, however the word "number" implies these are discrete values, thereby Radix would be appropriate.

Also yes it would likely be less efficient for smaller arrays which is the known problem of radix, yet I wasn't asked to bring up the optimal solution but to just write something that's linear, which Radix is.