Asked about Solving one under interview conditions
What do you do if you cannot solve it?
An answer that works
Say where I am and what I have eliminated, and propose the next thing to try. A working brute force with clear reasoning scores better than silence, and taking a hint well is a positive signal rather than a failure.
Reading an answer is not being able to give one. The section that teaches this is Solving one under interview conditions, 6 hours of Data structures & algorithms.
Learn this properlyAlso asked about Data structures & algorithms
Do AI engineering roles still ask algorithm questions?How do you decide how much algorithm preparation to do?When do you reach for a hash map?How do you recognise a sliding window problem?What is binary search on the answer?What is a monotonic stack for?When would you use BFS rather than DFS?How do you find the top k elements efficiently?
All 13 questions on Data structures & algorithms