|
|
|
|
|
by Double_a_92
2770 days ago
|
|
Would you be looking for the solution where you subtract every number in the array from 5050?
If anyone says that they 99% studied it. A more "natural" sulution would be to sort the list first, and then look for consecutive array items where the difference is not 1. |
|
I think questions like this are fun and novel and also have absolutely no place in an interview for software developers.
Edit: the slightest of arguments for a question like this is can they find novel runtime optimizations. A work sample test is better. Grab some crap code from the codebase like a double forloop that should have been a map look up and have them make it more performant.