Status: Graduated May 2019, then shortly worked for 2 months
Position: previously full stack web developer, interviewing for SDEI
Location: Newark, CA
Date: Mar 2020
I took the OA last November, and because of technical issue, the first time submission was lost and I took it a second time.
As far as I remember, both two OAs included an BFS question and a simpler question asking me to count words or do other kinds of manipulation/sorting to strings.
According to the feedback, I did "excellent" in OA.
[The virtual onsite]
(1 hour) Round 1 "algorithm" round with around 15 min LP
Algorithm was quoted because I think I was tested on global monetory expression trivia, rather than some so-called algorithm.
Interviewed by a Frontend Software Engineer, shadowed by another person.
The question is to find all the mention of money in a list of sentences, discount it by 85%, and then output all the updated sentences in original sequence.
I was confused at first since the cases of language usage is unlimited, so I asked for clarification regarding which kinds of monetory expression should be considered. However, the interviewer didn't give a explicit boundary, but showed me two examples, "15.5', get its numeric part, discount it by 85%, but I cant match '15.5 dollars' at the same time in this way, so I will try whether regex will help me.") But I got stuck again thinking RegEx expressions for such situation seems seldom required to be memorized during interviews. Therefore, I asked whether I can check documentations of regex expression, and after some silence from the interviewer, I went ahead and started to search for documentations online.
It seems that the interviewer didn't hear clearly and didn't get that I was about to search for some documentation. She asked me why I haven't moved for a couple of minutes, and I told her again about regex docs, and expected a confirmation whether the purpose of this challenge is to test me on regex. I didn't get a reply, and felt even more uncertain, so I deleted my code attempts about regex, and started to search for another way.
At this time, the interviewer seemed disappointed and told me that I can start with considering a simple case and then extend my solution to other cases. From her words, it still doesn't seem like a brutal if/else enumeration of all language cases of monetory expressions, since if so, she didn't have to show disappointment because I only failed in trying to find a better way than brutal force which neither exist nor is required. I also felt strange because a match algorithm for one kind of money expression won't be easily "extended", or modified, to match all others since their differences can't be expressed by a simple mathematic relationship, but I followed what she asked me to do.
Then she started to offer some probing for other cases, asking me what other expressions there might be. (Shit. That was my initial clarification question that she didn't answer clearly!) She started to ask more specific questions, like, what other money signs there're. That's another thing she refused to give me any hint previously. When I stopped at the line of code that check the money sign saying I don't know how to type other money signs, so I just temporarily use '$' only here, and she agreed. Now she asked me to tell her about other money signs, so I had to explain again that I knew there're others like european dollars, but don't know how to type it. She finally typed it in the shared doc for me. Then she asked me what would happen if there're money signs from some country that was put behind the digits in a same word. (Shit again. I've never seen money signs behind the digits, unless they're two separate words. Why I was supposed to know this trivia in an algorithem test? Whatever, I made the last effort by explaining "I've never seen this" to her.)
Then she mentioned the "33 dollars" case that she asked me to wait to consider at first, while I didn't consider this situation because I thought at that time it may end up more complicated as "thirty three dollars". Now she is more specific by asking me to consider "monetary signs behind the digits in a new word", so I decided "thirty three dollars" can be ignored temporarily.
So till then, I was finally clear which expressions I should consider, and such can conclude that there's no "one deal" solution, that only if/else is possible. So I rewrote the outermost logic of the three cases "if xxx, elif xxx, else", and wanted to utilize the last a couple of minutes to finish the details, but she asked me to stop, saying there's only three minutes left and it's the time for me to ask her some questions. (Shit. It was only her supposition that I can't finish writing it in 3 minutes, it's totally okay for me. And I was not given a chance to finish coding even I said I don't have questions for now.)
(1 hour) Round 2 Algorithm with 15 min LP
Interviewed by a Software Engineer in Test
Given an array of integers, for each integer in the array, find the first integer after it that is greater than itself.
I failed to discern "the first integer after it that is greater" from "the largest integer after itself", so I first tried to iterate from the last to the first digit, and store an helper array which is kept sorted by binary insert. Then I realized the misunderstanding and the interviewer asked me to find a different data structure.
Then I mentioned treemap saying "but there's no treemap offered in Python". Then the conversation went as: "what is treemap?" "a red-black tree underneath it" "what feature does it offer?" "Ah, I see. Still not the right data structure."
Then some silence and while I was still working, the interviewer asked me to consider stack. I realized almost immediately: "I see, monotonic stack!"
I finished the code very quickly. The interviewer asked me to Ctrl+Z to the previous code using binary search and took a screenshot. He recorded both of my solutions and there were still 5 minutes left for me to ask questions. While we moved on to the question round, my video suddenly stopped working and sound unclear. We gave up in the end. Both of the rest two interviews were conducted with voice only.
(1 hour) Round 3 Algorithm with 15 min LP
Interviewed by a Software Engineer and shadowed by another.
Given a list of sentences and a list of "good words", count the good words in each sentences and sort them in a decreasing manner.
I just simply used the built-in sort and put all elements to be considered in this sort in Python tuples.
After a clarification halfway, I learned that sentences with the same count of "good words" are sorted in their original sequence.
Time elapsed fast and even I use the audio only, it still stuck now and then in the first 20 minutes. I also had to explain a lot how Python compiler works. The SDE who shadowed the interview was also confused I wanted to check after splitting sentences to words simply using spaces, whether a "word" has a opening punctuation, thinking I might have mistakenly taking the quotes in his examples ["sentence1", "sentence2", ...] as within-sentence punctuations, so he stopped me, modified them into [sentence1, sentence2, ...] and asked me to reconsider (😂). Then when we talk about the time complexity, the shadower didn't discern "total number of words in all sentences" from "average number of words per sentence" and thought I was wrong at first, until I clarified. Then the time was used up and they said there're follow up questions they don't have time to ask. Even with the 5 minutes we spent trying to solve internet connection problems and the frequent being stuck because of the internet connection and shadower's problems, they didn't give me any extra time.
(1 hour) Round 4 (Behavioral Questions Only)
By the team manager himself, and he actually finished the interview 15-20 minutes earlier.
Conclusion:
I can see that I made a lot of mistakes in Behavioral Questions. I seldom had chance to take charge of the whole project in my past working experiences, which is not controllable by me (you don't know how women at marriage age with no money to support low paid internship-like jobs were marginalized in the industry in my country -- you'll be fired if you don't cooperate and spend time on things you're not authorized to do), and I'm still working to form better stories from my limited and maybe compromised experiences since I learned from some Amazon interviewers' articles that they care more about that you understand the LPs, rather than expecting all your previous companies offer you the same environment as Amazon does.
For the algorithm part, I think my experience of Amazon interview looks problamatical. They did't test a lot on abilities regarding logic and abstraction from problem description, but expected you to come up with language usages the same way as they do without giving enough clarifications even when being asked for. However, language usages are unlimited.