DEV Community

Deschant Kounou
Deschant Kounou

Posted on

Algorithmic problems in technical interviews

When facing an algorithmic problem in a technical coding interview, is the expectation that you'll break down the problem and intuitively find the optimal answer or that you'll know the right algorithm to use for that specific problem?

Like thinking of using Kadane's algorithm for a Maximum Sum Subarray Problem for example.

Top comments (4)

Collapse
 
polmonroig profile image
Pol Monroig Company

I think breaking the problem and finding the optimal solution is better since you need to really understand the algortihm to find your way to it. It think it represents a bigger understanding since knowing the answer directly is as useful as looking the answer in a book.

Collapse
 
deschant profile image
Deschant Kounou

Yes, I understand the importance of breaking down the problem. Either way, it is a necessary step to understand it.

At that point, however, would I be given more credit for attempting to come up with a solution on my own and possibly being wrong, or by being like "Oh, this looks like a problem that can be easily solved with x algorithm!"

Collapse
 
polmonroig profile image
Pol Monroig Company

Mmm that is more tricky because if you don't get to the answer it might seem like you don't know🤔 so I assume it depends. Maybe you don't know that answer but they can ask you more than 1 question.

Collapse
 
jeanlks profile image
Info Comment hidden by post author - thread only accessible via permalink
Jean Lucas Monte Carvalho

Okay. thx

Some comments have been hidden by the post's author - find out more