Tip 1: Prioritize practicing frequently asked interview questions initially.
Tip 2: Start with a brute force approach rather than immediately aiming for optimized code.
Tip 3: Seek assistance from the interviewer when facing difficulties. Stay calm and persistent when stuck, and keep trying without feeling tense.
Tip 1: List the projects and give a brief note about them.
Tip 2: Place only skills that you are confident in.
The assessment consisted of a few multiple-choice questions (MCQs) and 2 coding questions to be completed within a 2-hour timeframe. A 24-hour window was provided, allowing us to take the test at any convenient time from home.



You have to insert āabcā to āinputStringā in every operation.
If āinputStringā is empty just insert āabcā in āinputStringā
If āinputStringā is not empty, you can insert āabcā in any position in āinputStringā in such a way that:
1. ā LEFT PORTION OF āinputStringā ā + ā abc ā + ā RIGHT PORTION OF āinputStringā ā = āBeautiful Stringā.
2. ā LEFT PORTION OF āinputStringā ā maybe EMPTY OR āaā OR āabā OR āabcā.
3. ā LEFT PORTION OF āinputStringā ā maybe EMPTY OR ācā OR ābcā OR āabcā.
The given string "inputString" cannot be empty.



The distance between two points on a plane is the Euclidean Distance.
If N = 2, K = 1 and the points are {2,3}, {-1, 2}.
Then the distance of the first point from the origin is sqrt((2 - 0) ^ 2 + (3 - 0) ^ 2) = sqrt(13).
The distance of the second point from the origin is sqrt((-1 - 0) ^ 2 + (2 - 0) ^ 2) = sqrt(5).
Can you solve this in O(N log K) time complexity?
It was an interview round with an Amazon software engineer of SDE3 or above level. The interview was conducted through Amazon's video-based platform called Chime. It was scheduled for around 10:30 AM. The interviewer was very helpful; he made me feel comfortable before starting the interview.



If the input string is āstrā = āaazbbbyā, then your output will be āazbyā.
Note that we are just removing adjacent duplicates.
Initially, I attempted to solve it using n passes, where in each pass, we try to remove adjacent characters. However, the interviewer asked me to optimize the solution. I then utilized a stack approach, ensuring that each character was visited only once. This optimization reduced the time complexity to O(n).



1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
At first, I suggested using a hash map to store the count of every element. However, the interviewer requested a further reduction in both time and space complexity. In response, I implemented a binary search algorithm to find the first and last occurrences of the element, subsequently returning the difference between them.
The interview was scheduled for the morning at 11:00 AM. The interviewer joined promptly and introduced himself before requesting my introduction. The interview, conducted via Chime, began with project-related questions, followed by inquiries about data structures and coding.



In zigzag order, level 1 is printed from left to right fashion, level 2 is printed from right to left. and level 3 is printed from left to right again, and so onā¦..
For the given binary tree

The zigzag traversal is [1, 4, 3, 5, 2, 7, 6]
I initially attempted to print the level order traversal but later modified the approach to print the zigzag traversal.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
It was a managerial round scheduled for 10:00 AM. A software engineer at the managerial level promptly joined the call.



1. The helper function āknowsā is already implemented for you.
2. āknows(A, B)ā returns "false", if A doesn't know B.
3. You should not implement helper function āknowsā, or speculate about its implementation.
4. You should minimize the number of calls to function āknows(A, B)ā.
5. There are at least 2 people at the party.
6. At most one celebrity will exist.
I was struggling to find the approach and got the idea that it could be solved using a pointer approach to optimize the time complexity and space complexity. I gave my approach and the interviewer was happy with it. I tried to write the code. Basic test cases were passed. But one of the edge cases is not passed. I tried to modify the code but could not be able to complete it.




Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?