Round 1: Q-1 Given an array os 0s and 1s, and another input m, I was supposed to tell the longest continuous streak of 1s after flipping m 0s to 1s. E.g., Array is {1,1,0,0,1,1,1,0,1,1} m = 1 (which means I can flip ‘m’ one 0 to 1) Answer: 6 (if we flip 0 at index 7, we get the longest continuous streak of 1s having length 6) Q-2 Given N ropes of lengths L1, L2, L3, L4, …, LN. I had to join every rope to get a final rope of length L1 + L2 + … + LN. However, I can join only two ropes at a time and the cost of joining the two ropes is L1 + L2. I was supposed to join ropes in such a way that the cost is minimum. Round 2: Q-3 Given a BST, I needed to serialize it and deserialize it. This essentially boiled down to generating the “traversal” string and getting the BST back from the traversal. Q-4 There are two linked lists. Both linked lists have a single-digit number in their nodes. I needed to treat this linked lists as a numbers and add them up and store the digits in a new linked list. E.g., head -> 5 -> 6 -> 7-> 9 head -> 2-> 1 -> 1 Resultant linked list: head-> 5 -> 8-> 9-> 0 (5679 + 211 = 5890) Round 3: Hiring Manager round Q-5 Project discussion in detail. Most challenging problem, how did you solve it, had any disagreement with manager, how did you fix it etc. Q-6 Given an array {2, 4, 6, 0, 1, 8, 1}, where each element represents the height of tower located at its index. I was supposed to tell how much maximum water can accumulate in this “valley” once it rains. Round 4: Q-7 Given the encoding rule: A -> 0 B -> 1 C -> 2 … K -> 10 … Z -> 25 I was supposed to get the number of original strings possible given an encoded input. E.g., Given input 10, two possible original strings are possible BA and K, the answer is 2. Q-8 Given two trees, find out if the second tree is a “subtree” of the first one.
Software Development Engineer I Interview Questions
1,214 software development engineer i interview questions shared by candidates
7 Debug question
What is the difference between a stack and a queue? what is the time complexity of insert, delete and search?
Online exam had basic questions like find error in this code (for loop error, etc)
There are 3 sections and you need to do the 2nd section quite fast as it takes time to answer reasoning questions. Coding part is simple. Debugging is simple too.
1. (simple) Given array 0 and 1 sort them, here {0,1} are objects. 2. Variation of coins problem, ladder of height 100, u can use jumps {1,2,3} how many different ways can u reach 100. 3. Check if given binary tree is a mirror.
some stack related coding question.
Signed NDA. Was asked 2 questions. Similar level of an easy and medium difficulty question on Leetcode. Last 5 minutes were to ask the interviewer some questions about Amazon.
Send contacts
Design parking lot system with multiple entry and exit points
Viewing 1131 - 1140 interview questions