Contract Interview Experience
Questions:
- Quick Intro of the interviewer, following up with my intro.
- Four DSA questions were told to explain the approach and then have to write production-ready code.
- Given a binary tree, return the node reference or pointer of the node having a given value; if nothing, return NULL.
- Given a binary tree, perform Controlled In-Order Traversal (Non-Recursive).
- Given a Singly Linked List, remove the nth node from the last.
- Given an array, return the maximum sum subarray.
Candidate's Approach
- Used Call By Double pointer variable passed as the recursive call parameters to get the result for the binary tree question.
- Utilized a stack with two fields (node reference and boolean state) for Controlled In-Order Traversal.
- Initially proposed a two-pass solution for the linked list question, then switched to a recursive approach upon request.
- Implemented Kadane's algorithm for the maximum sum subarray.
Interviewer's Feedback
The interviewer was impressed with the approaches taken, especially the use of double pointers and the recursive solution for the linked list.
Amazon SDE 1 FTE Interview Experience
Questions:
-
Online Assessment: Coding Questions + Behavioral questions (3.5 hours total).
-
Technical Interview 1:
- Modified Version of Burn The Binary Tree (Hard GFG).
- Modified version of Painter Partition Problem (GFG Hard).
- Leadership Principles questions regarding software design and helping peers.
-
Technical Interview 2:
- Discussed a complex feature developed in a previous company.
- Coding Question: Maximum product subarray.
-
Hiring Manager Round: Discussed the transition from payments to groceries and fresh services.
-
Bar Raiser Round:
- Leadership principle questions regarding critical feedback, deep diving to resolve issues, and handling complex tasks.
- Coding Question: Given a set of linearly arranged values, return the top and middle element in O(1) time.
Candidate's Approach
- For the Burn The Binary Tree question, provided a DFS-based solution and dry ran the input.
- For the Painter Partition Problem, discussed binary search and conditions for determining partitions.
- In Technical Interview 2, explained the approach for the Maximum product subarray and modified the solution based on feedback.
- Proposed an optimal solution using two deques for the Bar Raiser coding question.
Interviewer's Feedback
Feedback from the first technical interview was positive, but the candidate struggled to convey the approach clearly at times. The second technical interviewer appreciated the candidate's experience and suggested reviewing design patterns and SOLID principles. The hiring manager found the candidate's responses satisfactory, and the bar raiser noted good communication but mentioned the need to follow the STAR pattern more closely.