Senior Software Engineer
Longest Zigzag Path in a Binary Tree
Find the longest zigzag path in a binary tree. A zigzag path is defined as one where the direction alternates between left and right. **Approach**: Track the previous direction and current length. If the last move was to the left, the next must be to the right, and vice versa.
This question was asked in
Paytm Senior Software Engineer Interview Experience
The interview process at Paytm consisted of three rounds, focusing on Data Structures and Algorithms (DSA) as well as System Design concepts. Candidates faced a mix of coding challenges and design questions, with increasing difficulty as they progressed. Overall, the experience was engaging, providing insights into technical problem-solving and design skills required at Paytm.