Hey leetcoders,
After grinding through about 300 Qs on leetcode I've started to get a bit confident to start taking on interviews. I'm able to at least figure out what type of problem it is 80% of the time and code it 70% of the time.
However, I always miss out on edge/corner cases and lots of off-by-one errors. I'm never able to submit a complete solution without getting it wrong 4-5 times first.
I wasnt too woried about this for interviews where we code on google doc etc because we dont really compile the code but I have an online assessment where correctness probably matters the most.
How do you guys get good at getting your code right and bug free? Any tips on creating test cases to do dry runs? Do people even have time left over to do dry runs and fix the code?
Thanks for any insight!