DEV Community

Ding Fan
Ding Fan

Posted on

Thoughts on solving basic algorithm problems

I relized that while solving basic algorithm problems like
https://www.hackerrank.com/challenges/birthday-cake-candles/problem
I should use basic logic/process like for/while/recursion. It's helpful to analyze my solution in view of complexity.

The last time I solving problems in an interview, I carelessly use built-in methods like map/sort, I was used to the habit of writing business code, "get things done whatever it takes, optimize later". Which left a bad impression to the interviewer, he might think that I'm suck at handling complixity.

Top comments (0)