<?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 Arpit Gupta on Medium]]></title>
        <description><![CDATA[Stories by Arpit Gupta on Medium]]></description>
        <link>https://medium.com/@WhiteHatArpit?source=rss-bcaaa11ef664------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*_tlF2UqZwY8X7pxI.jpg</url>
            <title>Stories by Arpit Gupta on Medium</title>
            <link>https://medium.com/@WhiteHatArpit?source=rss-bcaaa11ef664------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 00:46:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@WhiteHatArpit/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[Interviewing: An Algorithm]]></title>
            <link>https://medium.com/@WhiteHatArpit/interviewing-an-algorithm-df016cf9d8be?source=rss-bcaaa11ef664------2</link>
            <guid isPermaLink="false">https://medium.com/p/df016cf9d8be</guid>
            <category><![CDATA[google]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[interviewing]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[carnegie-mellon]]></category>
            <dc:creator><![CDATA[Arpit Gupta]]></dc:creator>
            <pubDate>Fri, 27 Aug 2021 03:17:58 GMT</pubDate>
            <atom:updated>2021-08-27T04:20:59.406Z</atom:updated>
            <content:encoded><![CDATA[<p>You are waiting in the room. Another room with the same three things: a table, a chair, and your worst enemy — the whiteboard. It seems to follow you everywhere. “Is today my day?”, the question ponders in your head as you watch the interviewer step in…</p><p>This guide is based on my personal experiences navigating technical interviews. I believe that having a structure can help you showcase your skills better and improve your chances of making it through the interview.</p><h3>Understand the Problem</h3><ul><li>Listen to the problem statement carefully<br>This sounds like the most basic tip but I want you to pay attention to the details. Some words can change the meaning of the problem.<br>e.g. <strong>in-place </strong>transformation, <strong>non-overlapping </strong>subset, <strong>largest </strong>sum, <strong>minimum </strong>distance</li><li>Ask for an example<br>A good problem will come with an example. If it doesn’t, don’t be afraid to ask for one.</li><li>Ask clarifying questions on the example<br>This is your second chance to make sure that you understand the problem. Be ready to ask questions if the example is not as expected.</li></ul><h3>Simplify the Problem</h3><p>Always ask for what type of inputs we are dealing with. Most of the time, the interviewer will make the problem easier.</p><ul><li>Input Constraints<br>e.g. a string can be Unicode or <strong>alphanumeric</strong>, numbers could be floating point or <strong>integers</strong>, negative or positive</li><li>Size of Input<br>e.g. sorting 100 numbers vs<strong> 1 million </strong>numbers, integer <strong>overflow</strong>/wrap-around</li><li>Edge cases<br>There could be some related edge cases. Make a note of them on the side.</li></ul><h3>Form a Solution</h3><ul><li>Listen to Ed Sheeran’s advice: <strong>Thinking Out Loud</strong><br>You want to communicate how you are thinking. The interviewer wants to understand how their prospective colleague brainstorms through a problem.</li><li>Pay attention to the hints<br>Trust me on this, the interviewer is your friend and wants you to succeed. They will give you hints to bring you back on track. They <strong>won’t </strong>try to mislead you. Building on top of the hint is a good way to proceed.</li><li>Look for the right data structure<br>Every solution uses some <strong>data structure</strong>. Start small and think what’s apt for the given problem.<br>e.g. variables =&gt; arrays (stack, queue) =&gt; linked list =&gt; tree (binary, heap, b-tree) =&gt; graph =&gt; hashmap</li><li>Look for the right algorithm<br>This is one of the hardest parts but once you have other pieces, it will all fall in place. Be ready to explore various options and work with them. Don’t worry about optimizing too much.<br>e.g. Arithmetic approach, traversal, sorting, dynamic programming</li><li>Explain your solution<br>Dry run through the given example to verify your solution and explain it to the interviewer. Make sure to use the whiteboard to keep notes and important bits. Don’t spend too much time formalizing the algorithm. Your code will do it.</li></ul><h3>Code the Solution</h3><ul><li>Write syntactically complete and modular code (think functions/classes)<br>Yes, your code should <strong>compile</strong>! Pick the language you are most comfortable with. Don’t take shortcuts, and write <strong>clean and elegant</strong> code.</li><li>Leave comments near edge cases<br>As you write the code, mark the places where you think there could be an <strong>edge case </strong>or constraint check. Address them at the end if time permits, otherwise it’s enough to let the interviewer know that you are thinking about it.</li><li>Verify your big three: &gt;=&lt;, off-by-one<br>A well written code can fail because of a wrong <strong>comparison </strong>operator or <strong>index</strong>. Go back and make sure that you got those right. <br>e.g. there are two midpoints for an even number of elements while one for an odd number of elements.</li></ul><h3>Verify the Solution</h3><ul><li>Run the example through the code<br>Given the limited time, most likely you won’t be required to write <strong>test cases </strong>for your solution. Thus, it’s important to do it manually. Create a table to track your different variables and step through your solution to show how it solves the given example. Feel free to test a more complex example too.</li><li>Space time complexity<br>Learn the Big O notation and provide your analysis. It’s very important to understand the <strong>performance </strong>of your solution. Only then you can propose improvements.</li><li>Propose any optimization/tradeoffs<br>Talking about the tradeoffs makes you a true engineer. You should be able to explain why you picked the particular data structure and the algorithm for the given problem, and how it could change for different input constraints.</li></ul><p>This whole process should take somewhere about 20–30mins depending on how fast you can solve the problem. At this point, either you will be given an extension to the same problem or a completely new problem. Stay calm and repeat! Practice often to improve your pace.</p><p>At the end of the interview, take the opportunity to ask some questions. This is your chance to understand about the organization or the interviewer’s day-to-day work. Some things to be curious about:</p><ul><li>What kind of problems do you solve?</li><li>What kind of challenges do you face?</li><li>How is x different from y?</li></ul><p>I hope this helps you make a new best friend — the whiteboard.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df016cf9d8be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>