3 ms·
> in a less than optimal fashion for the most part, but solved and "correct" to pass the test cases You wouldn’t get through the interview. Most questions have
by 3qz 5y ago
> in a less than optimal fashion for the most part, but solved and "correct" to pass the test cases
You wouldn’t get through the interview. Most questions have a very easy brute force solution, but the answer they’re looking for is the optimal one. There’s also time constraints. Figure out the runtime complexity of your answer and compare it to the solutions.
- justinlloyd 5y agoUnderstood. So what I should be doing is trying create optimal solutions. Obviously completely optimal solutions on some of them could take hours, if not years to come up with. Those would be "you either know it or you don't" or you're the equivalent of Mozart when it comes to code. I am thinking I will work on some of those solutions today.
- 3qz 5y ago> Obviously completely optimal solutions on some of them could take hours, if not years to come up with. Yep. Once you know the common patterns then most of the easy questions are pretty easy to solve optimally in 10-15 minutes. A lot of the hard questions seem impossible unless you’ve seen the problem before and I’m not sure what an effective strategy for those is.