<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Swaraj Mishra on Medium]]></title>
        <description><![CDATA[Stories by Swaraj Mishra on Medium]]></description>
        <link>https://medium.com/@swmshra?source=rss-abdc66049c12------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*cKwkIIt55_ePAcmW.</url>
            <title>Stories by Swaraj Mishra on Medium</title>
            <link>https://medium.com/@swmshra?source=rss-abdc66049c12------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 18:07:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@swmshra/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Amazon 6 months internship interview experience]]></title>
            <link>https://medium.com/@swmshra/amazon-6-months-internship-interview-experience-2e8086576144?source=rss-abdc66049c12------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e8086576144</guid>
            <category><![CDATA[amazon]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[internships]]></category>
            <category><![CDATA[amazon-india]]></category>
            <category><![CDATA[interview]]></category>
            <dc:creator><![CDATA[Swaraj Mishra]]></dc:creator>
            <pubDate>Mon, 30 Dec 2019 09:04:36 GMT</pubDate>
            <atom:updated>2019-12-30T09:04:36.754Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Amazon logo" src="https://cdn-images-1.medium.com/max/767/1*cUzh3XXR8iYQCopcWRFaJg.jpeg" /></figure><p>This article is about my interview experience at Amazon Bangalore. I have explained every question that I was asked and the approach I used.</p><p>I applied for the 6 months internship through referral at the end of November. I thought if you apply through a referral it takes about 1–2 days to get back from HR but after 2–3 days, when no one contacted me I thought I am not going to hear back from them. But after two weeks, I got the mail about the online coding round.</p><p><strong>Round 1: Online Coding Round</strong><br>There were 2 coding questions and 28 MCQ.</p><ol><li>Infix to Postfix conversion</li><li>Very easy string manipulation question.</li></ol><p>I was able to solve both the coding question and attempted every MCQ. I don’t know how many I got right because the result was not shown.</p><p>After two days, they told me about the onsite interview and that I had to go to the Amazon Bangalore office.<br>On the day of the interview, I went to the office. There were about 70–80 other students. Their office is amazing.</p><p><strong>Round 2: Technical Interview</strong><br>This was 60 minutes round and 2 coding questions were asked. I solved one completely and one partially. My interviewer was cool and friendly. Although he was not smiling a lot, he made me feel like we are having a discussion about the question. He started with the usual about you question and then directly jumped to the coding questions.<br>Q1. You are on the ground stair and you have to reach ‘Nth’ stair. At any stair, you can take at most ‘K’ steps. Find the total number of ways you can reach the Nth stair. <em>int countWays(int N, int K)</em><br>He explained to me the question, then explained to me through a sample test case. And then asked me to first explain the approach and if he is satisfied with the approach, then only I can code. He told me that he will also note things down on his laptop.<br>Firstly, I gave him the recursive brute force solution. Then he asked me to optimize it. Then I gave him the DP-approach with time complexity O(N*K) and space complexity O(N). Then he asked me to further optimize it. I used another variable to store the sum of last K stairs and increase its value for ith stair and decrease for (i-k)th stair. Now my time complexity was O(N) and space complexity was O(N). I thought that now I can code, but he again asked me to optimize the space. Then, after thinking for a while, I gave him O(K) space queue solution. He was satisfied with the approach and asked me to code it. Again he explained to me what he is expecting while writing the code. (Readable, modular, indented, meaningful variable name). Then I wrote the code, he checked it and was satisfied.<br>Q2. <a href="http://https//leetcode.com/problems/smallest-string-with-swaps/">Smallest string with swaps</a><br>It was difficult for me to come up with the brute force solution and I told him. Then he gave me some hints, and with his help, I came up with a brute force solution. After that, we had some discussion that whether the brute force solution will always give the correct solution. After that, he asked me to optimize it, which I was trying but he told me that time is up and if I have any questions. I just asked him about the role of the intern and which team is hiring the interns.</p><p>After 15 minutes, they told me that I am moving to the next round.</p><p><strong>Round 2: Technical Interview</strong><br>It was also 60 minutes round and 3 coding questions were asked. First, he asked me to give a brief introduction. Then he asked me about my internship and my projects. Then he told me what he is expecting from me in this round. He told me that he will ask 2–3 questions (depending on the time) and I need to explain to him my logic first, and then code. Also, follow good coding practices. He told me that I cannot have mistakes while writing the code and that he will write the exact code on his machine(not sure if he really did that, but he was typing something on his laptop).<br>Q1. Trapping rainwater problem.<br>Firstly, gave him the brute force solution O(N²). He told me to optimize it. Then gave him the leftMax and rightMax array approach. He said I can code now. While writing the code I made sure to keep it clean, use function whenever I can, use the descriptive variable name. He looked at my code, asked me a few questions, and then moved to the second question.<br>Q2. <a href="https://www.geeksforgeeks.org/dynamic-programming-building-bridges/">https://www.geeksforgeeks.org/dynamic-programming-building-bridges/</a> I told him that I just need to find the LIS in the array. He told me how I would do that. I gave him O(N²) approach. He was satisfied and asked me to code.<br>Q3. It was an easy question. He asked me there is a land, and there is a lake inside. I just need to find the size of the lake. I asked him if I can assume the land and lake to be rectangular (Be sure to ask before making an assumption). I told him that I can use 1 for land, 0 for water, and then apply DFS when I encounter any 0. Then he asked questions on DFS and how I will do that. I explained to him my approach and then he asked me to write the pseudo-code for it.<br>Then he asked if I have any questions. I asked him some questions.</p><p>Then after about 30 min, HR called me and congratulated me.</p><p><strong>Advice for interview</strong></p><ol><li>No matter how much time is left, make sure your code follows good practices. They will keep the paper where you wrote the code, and then later review it in case they have any doubt on you. So make sure, what you write is clearly understandable. Your code, your logic, your diagram, your test cases.</li><li>Make sure you are having discussions and not an interview. Make sure to explain your approach and answers his/her questions in a way that makes it look like a discussion. How? Explain things like you know things, don’t guess but explain why you are thinking of a recursive solution.</li><li>Always lookup on the internet the answers to your questions. The next interviewer might ask you.</li></ol><p><strong>Advice while preparing</strong></p><ul><li>Although I thought I will never hear from them, I was still coding. So even though you might think you don’t have to study now, push yourself to do it every day. Opportunity never knocks on your door, those who are ready can only grab it.</li><li>Don’t believe that it will all make sense in the end. Because it will not. You are the only one responsible for your life, and if you think opportunities will come to you, they will not. You have to look every second if there is an opportunity and make sure to not let it go waste.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e8086576144" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>