Amazon WOW | Interview Experience 2022 | Role | 2 Months SDE Internship (Off – Campus)

Online Assessment :

It was an offline test conducted on 21 August 2022 on hackerrank website. It was 2 coding questions in 70min. 

First Question : 

Find the minimum number of characters that must be appended at the end of searchWord, such that resultWord is a subsequence of the modified searchWord

Example 

searchWord = “aemaze”

resultWord = “amazon”

Add 2 characters ‘on’ to searchWord to make resultWord, a subsequence of searchWord.

Solution : 

Put a pointer to the searchWord and the resultWord. If the searchWord[p1]==resultWord[p2], increment p1 and p2 else increment only p1. 
Return the difference of the length of resultWord and p2.

All the test cases passed.

Second Question : 

The price of Amazon common stock is analyzed over a period of several months.

A group of K consecutive months it said to be observable if no two months in the group have the same stock price.In other words, all the prices in the period are distinct.The sum of stock prices of an observable group of months is called the cumulative observable sum. Given the price of Amazon stock for n months, find the maximum possible cumulative observable sum among all the observable group of months. If there is no observable group return -1.

Example : 

Monthly stock prices are given as stockPrice = [1, 2, 7, 7, 4, 3, 6] and the number of consecutive months to consider is K = 3.

Output : 14

Solution : Use sliding window protocol

Only 11/15 test casses passed. Encountered TLE.

After 2 months, I received a mail from Amazon WOW that i was shortlisted for the interview.

Interview took place on October 17, 2022.

Technical Interview : 

It was a 1hr Virtual Interview. First 5min was Self Introduction. 

 He asked me a total of 3 questions… The first one was on live stream of arrays and i have to find the n least elements… I answered him in a sorting approach or comparing and storing approach…he told i was half right. The second question was on graphs where I had to convert the given graph into a new graph by replacing each node with the sum of nodes greater than it. Because I had not much technical knowledge of graphs, he made it simple for me by converting it into an array. For this question too, i went to half way of sorting …he revealed the rest of the answer. Later the 3rd question was on dictionaries, and i answered it completely….

I did not get selected but it was a nice experience. The interviewer was very nice and helpful.


Contact Us