The interviewer is a DQA who already works there. The conversation was relaxed overall, the interviewer was easygoing and happy to talk and give hints, and the whole thing felt more like chatting while solving problems.
Climbing stairs: each step you can choose from xx ways of moving, and you need to count how many ways there are to reach step n. This maps to LeetCode 70, and DP is enough. There was a follow-up asking whether the space complexity can be reduced.
Counting triplets: given an array, pick three elements at different positions, and count the triplets whose product is even. You are asked to output the result modulo xxx. Remember to add the modulo, otherwise one test case fails. Since it was fairly simple, the interviewer did not ask about complexity.
Making array elements equal: each move, you fix one element and add 1 to all the other elements, and you need the minimum number of operations. This maps to LeetCode 453.
Discussion
Loading comments…