DEV Community

Discussion on: I failed an interview because of an algorithm

Collapse
 
avmohan profile image
Abhijith V Mohan

As algorithm interviews go, this is very much on the easy side.
Typically when people say coding interviews need too much algorithm knowledge which are not required in daily life, they mean stuff like dynamic programming and Dijkstras. This one can be solved without any sort algorithm knowledge at all. Just need to provide a custom comparator to the standard sort.