Re:A guide to learning algorithms through LeetCode
by SerialOwl on Monday August 17, 2020 @06:30AM
(#24185856)
How do you expect to convince the interviewer that your solution was correct without tests? How can you debug your code properly if you end up with a spaghetti mess instead of using a clean design?
[ Parent
| on HN ]
Re:A guide to learning algorithms through LeetCode
by noema on Thursday August 20, 2020 @02:52PM
(#24227085)
Testing and debugging vary from site to site. Most of the ones I've used run your code against a hidden suite of tests to check all possible edge cases. This would otherwise take up a very non-trivial amount of time in the session. Actual debugging is also not possible on all of the sites -- usually the most you can do is litter your code with logs, which is far from a clean design.