Amazon (Audible) - 2022 | phone interview | first unique character in a string + zigzag traversal

amazon logo
amazon
No Offer
January 24, 20223 reads

Summary

I had a 1-hour phone interview with Amazon (Audible) in 2022, which included two coding questions. I solved the first one easily, but struggled with the second, despite having seen it before.

Full Experience

I recently experienced a 1-hour phone interview with Amazon (Audible) in 2022. The interview consisted of two coding challenges. I found the first question to be quite straightforward and solved it without much difficulty. However, the second question was familiar to me from prior practice, but I unfortunately forgot the specific approach involving a deque during the interview and was unable to provide a correct answer.

Interview Questions (2)

Q1
First Unique Character in a String
Data Structures & AlgorithmsEasy

Given a string s, find the first non-repeating character in it and return its index. If it does not exist, return -1.

Q2
Binary Tree Zigzag Level Order Traversal
Data Structures & AlgorithmsMedium

Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between). The solution should return a list of lists where each inner list represents a level's values in zigzag order.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!