<?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 Ravi Bhatt on Medium]]></title>
        <description><![CDATA[Stories by Ravi Bhatt on Medium]]></description>
        <link>https://medium.com/@codingforinterviews?source=rss-f54fa7a52a05------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*J7KBIbH9tDNr_rmwIjLflA.jpeg</url>
            <title>Stories by Ravi Bhatt on Medium</title>
            <link>https://medium.com/@codingforinterviews?source=rss-f54fa7a52a05------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:03:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@codingforinterviews/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[Why Your OrderService Is a Ticking Time Bomb — And How the Single Responsibility Principle Fixes It]]></title>
            <link>https://medium.com/coding-becomes-easy/why-your-orderservice-is-a-ticking-time-bomb-and-how-the-single-responsibility-principle-fixes-it-1f24e27850bf?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f24e27850bf</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 06:46:00 GMT</pubDate>
            <atom:updated>2026-03-12T06:46:00.797Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>The sneaky violation that turns clean code into a codebase nobody wants to touch</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UMjCA3y-p9wn7E23" /><figcaption>Photo by <a href="https://unsplash.com/@austindistel?utm_source=medium&amp;utm_medium=referral">Austin Distel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I once joined a project where a single class had quietly become the most dangerous file in the entire codebase.</p><p>Nobody intended for this to happen.</p><p>The class was called OrderService.</p><p>Innocent name. Reasonable at the start.</p><p>But over two years, every developer who touched the project had added <em>just one more small thing</em> to it.</p><p>By the time I arrived, the class was:</p><ul><li>validating orders</li><li>calculating prices</li><li>applying discounts</li><li>saving orders to the database</li><li>sending confirmation emails</li><li>generating invoices</li><li>logging activity</li></ul><p>Three developers on the team were openly afraid to modify it.</p><p>Every change risked breaking something completely unrelated.</p><p>One night, a discount rule changed. We updated the logic. The next morning, invoice emails were firing twice for every order.</p><p>Same class. Unrelated concern. Catastrophic side effect.</p><p>That bug cost us an entire weekend.</p><p>This is exactly the scenario the <strong>Single Responsibility Principle (SRP)</strong> exists to prevent.</p><h3>What Is the Single Responsibility Principle?</h3><p>SRP is the “S” in <strong>SOLID</strong> — the five foundational principles of clean object-oriented design.</p><p>It states:</p><blockquote><strong><em>A class should have only one reason to change.</em></strong></blockquote><p>Simple sentence. Profound consequences.</p><p>In practice, it means every class should own one clearly defined job. Not two. Not <em>“mostly one, but also this small thing.”</em> One.</p><p>The moment a class starts owning multiple concerns, you’ve created a hidden dependency between things that have no business being connected.</p><h3>The Problem: An OrderService That Does Everything</h3><p>Here’s a simplified but painfully realistic example — the kind of code you’ll find in most growing codebases.</p><p>java</p><pre>class OrderService {<br>    public void processOrder(Order order) {<br>        // 1. Validate order<br>        if (order.getItems().isEmpty()) {<br>            throw new RuntimeException(&quot;Order has no items&quot;);<br>        }<br>        if (order.getCustomerEmail() == null) {<br>            throw new RuntimeException(&quot;Customer email missing&quot;);<br>        }<br>        // 2. Calculate total price<br>        double total = 0;<br>        for (Item item : order.getItems()) {<br>            total += item.getPrice() * item.getQuantity();<br>        }<br>        // 3. Apply discount<br>        if (total &gt; 1000) {<br>            total = total * 0.9;<br>        }<br>        order.setTotalPrice(total);<br>        // 4. Save order to database<br>        System.out.println(&quot;Saving order to database&quot;);<br>        // 5. Send confirmation email<br>        System.out.println(&quot;Sending confirmation email to &quot; + order.getCustomerEmail());<br>        // 6. Generate invoice<br>        System.out.println(&quot;Generating invoice&quot;);<br>        // 7. Log order<br>        System.out.println(&quot;Logging order processing&quot;);<br>    }<br>}</pre><p>At first glance, this looks perfectly fine.</p><p>It’s only when you ask <em>“what could cause this class to change?”</em> that the problem becomes visible.</p><h3>Count the Reasons This Class Will Change</h3><p>Ask yourself: how many <strong>separate, unrelated reasons</strong> does OrderService have to be modified?</p><p>Let’s count:</p><ol><li><strong>Validation rules change</strong> → modify OrderService</li><li><strong>Discount logic changes</strong> → modify OrderService</li><li><strong>Database implementation changes</strong> → modify OrderService</li><li><strong>Email provider changes</strong> → modify OrderService</li><li><strong>Invoice format changes</strong> → modify OrderService</li><li><strong>Logging framework changes</strong> → modify OrderService</li></ol><p><strong>Six unrelated reasons to touch the same file.</strong></p><p>Six opportunities to accidentally break something in a completely different concern.</p><p>This is what software engineers call a <strong>God Class</strong> — a class that knows too much, does too much, and makes testing, debugging, and refactoring a nightmare.</p><p>And the worst part? It usually starts with one innocent method.</p><h3>The Fix: One Class, One Responsibility</h3><p>The solution is to split each concern into its own dedicated class.</p><h3>Order Validator</h3><pre>class OrderValidator {<br>    public void validate(Order order) {<br>        if (order.getItems().isEmpty()) {<br>            throw new RuntimeException(&quot;Order has no items&quot;);<br>        }<br>        if (order.getCustomerEmail() == null) {<br>            throw new RuntimeException(&quot;Customer email missing&quot;);<br>        }<br>    }<br>}</pre><h3>Price Calculator</h3><pre>class PriceCalculator {<br>    public double calculateTotal(Order order) {<br>        double total = 0;<br>        for (Item item : order.getItems()) {<br>            total += item.getPrice() * item.getQuantity();<br>        }<br>        if (total &gt; 1000) {<br>            total = total * 0.9;<br>        }<br>        return total;<br>    }<br>}</pre><h3>Email Service</h3><pre>class EmailService {<br>    public void sendConfirmation(Order order) {<br>        System.out.println(&quot;Sending confirmation email to &quot; + order.getCustomerEmail());<br>    }<br>}</pre><h3>Invoice Service</h3><pre>class InvoiceService {<br>    public void generateInvoice(Order order) {<br>        System.out.println(&quot;Generating invoice for order&quot;);<br>    }<br>}</pre><h3>Order Repository</h3><pre>class OrderRepository {<br>    public void save(Order order) {<br>        System.out.println(&quot;Saving order to database&quot;);<br>    }<br>}</pre><h3>The Orchestrator: A Leaner OrderService</h3><p>Now OrderService does exactly one thing — it <strong>coordinates</strong> the process. It doesn&#39;t own any logic itself.</p><p>java</p><pre>class OrderService {<br><br>    private final OrderValidator validator;<br>    private final PriceCalculator calculator;<br>    private final OrderRepository repository;<br>    private final EmailService emailService;<br>    private final InvoiceService invoiceService;<br>    // Constructor injection makes dependencies explicit and testable<br>    public OrderService(OrderValidator validator, PriceCalculator calculator,<br>                        OrderRepository repository, EmailService emailService,<br>                        InvoiceService invoiceService) {<br>        this.validator = validator;<br>        this.calculator = calculator;<br>        this.repository = repository;<br>        this.emailService = emailService;<br>        this.invoiceService = invoiceService;<br>    }<br>    public void processOrder(Order order) {<br>        validator.validate(order);<br>        double total = calculator.calculateTotal(order);<br>        order.setTotalPrice(total);<br>        repository.save(order);<br>        invoiceService.generateInvoice(order);<br>        emailService.sendConfirmation(order);<br>    }<br><br>}</pre><p><em>(Note: using constructor injection — rather than instantiating dependencies directly — makes each class independently unit-testable. This matters.)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*v6uHUHmEJMvI1AuoiRiHQA.jpeg" /></figure><h3>What Actually Changes When You Do This</h3><p>The benefits aren’t just theoretical. Here’s what you gain immediately:</p><p><strong>Isolated changes.</strong> Discount logic changes? Open PriceCalculator. Touch nothing else. Zero risk of breaking email or invoicing.</p><p><strong>Testability.</strong> You can now write a unit test for PriceCalculator in complete isolation — no database, no email server, no mocking a God Class.</p><p><strong>Readability.</strong> New developers reading OrderService now understand the entire order flow in 6 lines. No archaeology required.</p><p><strong>Parallel work.</strong> Two developers can modify EmailService and InvoiceService at the same time without merge conflicts.</p><h3>The Mental Check to Use Every Time</h3><p>Before you finish writing any class, ask yourself one question:</p><blockquote>For what unrelated reasons might this class change in the future?</blockquote><p>If you can list more than one, you’re carrying multiple responsibilities in one place.</p><p>Split them. Your future self — and your teammates — will thank you.</p><h3>The Habit That Separates Senior Devs From Everyone Else</h3><p>Junior developers write code that works.</p><p>Mid-level developers write code that’s organized.</p><p>Senior developers write code that <strong>survives change</strong> — and they do it by giving every class exactly one job, named so clearly that its purpose is never in question.</p><p>SRP is not about writing more files.</p><p>It’s about writing code where a bug in the email system cannot possibly corrupt your invoice logic.</p><p>Start asking <em>“what are the reasons this class would change?”</em> on every class you write this week.</p><p>You’ll be surprised how often the answer is <em>“more than one.”</em></p><blockquote>Did this resonate? I’m writing the full SOLID series on Medium — covering Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion with the same real-world examples. Follow to catch the next one.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f24e27850bf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/why-your-orderservice-is-a-ticking-time-bomb-and-how-the-single-responsibility-principle-fixes-it-1f24e27850bf">Why Your OrderService Is a Ticking Time Bomb — And How the Single Responsibility Principle Fixes It</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Solving LeetCode — Learn Design Patterns With This Game]]></title>
            <link>https://medium.com/coding-becomes-easy/stop-solving-leetcode-learn-design-patterns-with-this-game-0f0f195f0fae?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f0f195f0fae</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Tue, 10 Mar 2026 17:13:35 GMT</pubDate>
            <atom:updated>2026-03-10T17:26:08.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oybGhtUSc3n-ZByfMBeVBg.png" /></figure><p>Most developers spend hours solving algorithm problems on LeetCode.</p><p>Binary trees.<br>Dynamic programming.<br>Graph traversal.</p><p>These problems are great for improving algorithmic thinking, but they rarely reflect the problems developers actually face in real projects.</p><p>In real software engineering, the hardest problems are not algorithms.</p><p>They are architecture problems.</p><p>Questions like:</p><ul><li>How do I remove a giant if-else chain?</li><li>How do I decouple components?</li><li>How do I make code extensible without modifying existing classes?</li></ul><p>These are exactly the problems <strong>design patterns</strong> were created to solve.</p><p>But learning design patterns from books is painfully boring.</p><p>So I decided to try something different.</p><p>I built a game.</p><h3>The Idea: A Dungeon Where You Escape by Refactoring Code</h3><p>Instead of solving algorithm puzzles, you enter a dungeon room.</p><p>Inside each room, you find <strong>bad code</strong>.</p><p>Your goal is simple:</p><p>Refactor the code using the correct design pattern to unlock the door.</p><p>Example challenge:</p><h3>Code Smell: Large Conditional Logic</h3><pre>class AuthenticationService {</pre><pre>void login(String type){</pre><pre>if(type.equals(&quot;google&quot;)){<br>System.out.println(&quot;login using google&quot;);<br>}<br>else if(type.equals(&quot;facebook&quot;)){<br>System.out.println(&quot;login using facebook&quot;);<br>}<br>else if(type.equals(&quot;github&quot;)){<br>System.out.println(&quot;login using github&quot;);<br>}<br>else if(type.equals(&quot;email&quot;)){<br>System.out.println(&quot;login using email&quot;);<br>}</pre><pre>}</pre><pre>}</pre><p>Your mission:</p><p>Refactor it using the <strong>Strategy Pattern</strong>.</p><h3>Example Solution</h3><pre>interface AuthenticationStrategy {<br>    void login();<br>}</pre><pre>class GoogleAuthenticationStrategy implements AuthenticationStrategy {<br>    public void login(){<br>        System.out.println(&quot;login using google&quot;);<br>    }<br>}</pre><pre>class FacebookAuthenticationStrategy implements AuthenticationStrategy {<br>    public void login(){<br>        System.out.println(&quot;login using facebook&quot;);<br>    }<br>}</pre><pre>class AuthenticationService {</pre><pre>    public void login(AuthenticationStrategy strategy){<br>        strategy.login();<br>    }</pre><pre>}</pre><p>Once the correct pattern is implemented, the dungeon door unlocks.</p><p>You move to the next room.</p><h3>Why I Built This</h3><p>I noticed a gap in how developers learn architecture.</p><p>Most platforms focus on:</p><ul><li>algorithms</li><li>data structures</li><li>coding interviews</li></ul><p>But in real projects, developers struggle with things like:</p><ul><li>tight coupling</li><li>god classes</li><li>conditional logic explosions</li><li>object creation scattered everywhere</li></ul><p>These are classic <strong>code smells</strong> that design patterns help solve.</p><p>So I thought:</p><p>What if learning design patterns felt like playing a game?</p><h3>Features of the Game</h3><p>The project includes:</p><ul><li>Infinite puzzles generated automatically</li><li>Multiple design patterns</li><li>Code smell detection</li><li>A built-in code editor</li><li>Instant feedback when patterns are detected</li></ul><p>Players can practice patterns like:</p><ul><li>Strategy</li><li>Singleton</li><li>Factory</li><li>Observer</li><li>Decorator</li></ul><p>Each room presents a different architecture problem.</p><h3>Procedural Puzzle Generator</h3><p>Instead of storing static puzzles, the game generates code automatically.</p><p>For example, the generator may produce something like this:</p><pre>class ShippingService {</pre><pre>void ship(String type){</pre><pre>if(type.equals(&quot;air&quot;)){<br>System.out.println(&quot;ship via air&quot;);<br>}<br>else if(type.equals(&quot;sea&quot;)){<br>System.out.println(&quot;ship via sea&quot;);<br>}<br>else if(type.equals(&quot;road&quot;)){<br>System.out.println(&quot;ship via road&quot;);<br>}</pre><pre>}</pre><pre>}</pre><p>The player must recognize the smell and refactor it using the correct pattern.</p><p>This makes the game produce <strong>unlimited puzzles</strong>.</p><h3>Built With</h3><p>The project is intentionally simple and runs directly in the browser.</p><p>Tech stack:</p><ul><li>HTML</li><li>CSS</li><li>JavaScript</li><li>Monaco Editor (the editor used by VS Code)</li></ul><p>The game is deployed using GitHub Pages.</p><h3>Try the Game</h3><p>You can play it here:</p><p><a href="https://12shankar12ravi.github.io/design-pattern-dungeon/">https://12shankar12ravi.github.io/design-pattern-dungeon/</a></p><h3>What I Learned While Building It</h3><p>Building this game reinforced an important idea:</p><p>Architecture skills improve through <strong>practice</strong>, not memorization.</p><p>Reading about design patterns is useful.</p><p>But actually <strong>refactoring bad code into good architecture</strong> is what makes the concepts stick.</p><h3>Future Improvements</h3><p>Some ideas I’m exploring next:</p><ul><li>Boss battles against “God Classes”</li><li>Daily design pattern challenges</li><li>Leaderboards</li><li>AI-generated code smells</li><li>Support for multiple languages</li></ul><h3>Final Thought</h3><p>Algorithms help you pass interviews.</p><p>Architecture helps you build real systems.</p><p>If you want to level up as a developer, start practicing design patterns the same way you practice algorithms.</p><p>And if you enjoy learning through games, give this one a try.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f0f195f0fae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/stop-solving-leetcode-learn-design-patterns-with-this-game-0f0f195f0fae">Stop Solving LeetCode — Learn Design Patterns With This Game</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Product of array except itself | Google Interview Question]]></title>
            <link>https://medium.com/coding-becomes-easy/product-of-array-except-itself-google-interview-question-42541aac7515?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/42541aac7515</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Sun, 01 Feb 2026 19:48:52 GMT</pubDate>
            <atom:updated>2026-03-10T17:27:33.697Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this blog we will learn about famous interview question that is asked in google 8 times.</blockquote><p>Hi Guys , Long time no show ….. Sorry guys. Let’s continue now in the series of solving medium to hard interview questions with Ravi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2awvedKLlmqyleYn" /><figcaption>Photo by <a href="https://unsplash.com/@yortrosal?utm_source=medium&amp;utm_medium=referral">Jorge Rosal</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let me introduce you with the question , your job is to read &amp; understand the question &amp; try to think a basic approach for solving the question , feel free to <strong>use the notepad and try with self made test cases</strong>.</p><blockquote>Given an integer array nums, return <em>an array</em> answer <em>such that</em> answer[i] <em>is equal to the product of all the elements of</em> nums <em>except</em> nums[i].</blockquote><blockquote>The product of any prefix or suffix of nums is <strong>guaranteed</strong> to fit in a <strong>32-bit</strong> integer.</blockquote><blockquote>You must write an algorithm that runs in O(n) time and without using the division operation.</blockquote><blockquote><strong>Example 1:</strong></blockquote><blockquote>Input: nums = [1,2,3,4]<br>Output: [24,12,8,6]</blockquote><blockquote><strong>Example 2:</strong></blockquote><blockquote>Input: nums = [-1,1,0,-3,3]<br>Output: [0,0,9,0,0]</blockquote><blockquote><strong>Constraints:</strong></blockquote><blockquote>2 &lt;= nums.length &lt;= 105</blockquote><blockquote>-30 &lt;= nums[i] &lt;= 30</blockquote><blockquote>The input is generated such that answer[i] is <strong>guaranteed</strong> to fit in a <strong>32-bit</strong> integer.</blockquote><p>I hope you read &amp; understand the question , but if you tried but still you didn’t understand let me break it in simple steps.</p><p>Ok...Question is saying we have an array of numbers &amp; we need to return the answer array in which each element would be product of all elements in input array except current ith element.</p><p>Now in pseudocode words :</p><p>answer[i] = product(nums[0..i-1],nums[i+1..n])</p><p>I hope it is quite clear now .. Now let’s try to think a basic solution of this problem .</p><pre>nums = [1,2,3,4]<br><br>If we take product of all elements and save it in some variable like p <br>for the above case p = 1*2*3*4 = 24.<br><br>for each element of nums <br>    ans[i] = p / nums[i]</pre><p>Can we say the above pseudocode can solve our problem ? Yes or No…</p><p>If you ask me , answer is NOOOOO……………………………………………………</p><p>But why ?? coz .. it can fail in some cases , think about the below this test case .</p><p>nums = [-1,1,0,-3,3] , product = 0</p><p>Using our above algorithm , ans = [0/-1,0/1,0/0,0/-3,0/3] = [0,0,0,0,0] . But can you observe this that our answer is wrong , as product of array excluding nums[2] is 9.</p><p>Now , without further delay . Let’s try and think about another approach . What if we split the array into two parts prefix and suffix . Essentially we need to find the product of prefix product &amp; suffix product right ?? In the case of [-1,1,0,-3,3] . ans[2] = prefix Product[0..1] * suffixProduct[2,4] = -1*-9 = 9.</p><p>We understood that we can use some kind of prefix , suffix array approach , where we can precalculate the prefix products and suffix product arrays. Then while going through input array we can find the result array by multiplying prefixProduct[i-1] and suffixProduct[i+1].</p><p>Ok let’s code then , At this moment , Pause here &amp; try to write the code if you understood the approach.</p><pre>class Solution {<br>    public int[] productExceptSelf(int[] nums) {<br>        int n = nums.length;<br>        int[] prefixP = new int[n];<br>        int[] suffixP = new int[n];<br>        int[] ans = new int[n];<br><br>        prefixP[0] = nums[0];<br>        for(int i=1 ; i&lt;n ; i++)<br>        {<br>            prefixP[i] = prefixP[i-1] * nums[i];<br>        }<br><br>        suffixP[n-1] = nums[n-1];<br><br>        for(int i = n-2 ; i&gt;=0 ; i--){<br>            suffixP[i] = suffixP[i+1] * nums[i];<br>        }<br>        ans[0] = suffixP[1];<br><br>        for(int i=1 ; i&lt;n-1 ; i++){<br>            ans[i] = prefixP[i-1] * suffixP[i+1];<br>        }<br><br>        ans[n-1] = prefixP[n-2];<br><br>        return ans;<br>    }<br>}</pre><p>I think code is self explanatory . We see the time complexity is O(n) and space complexity is O(n)</p><p>Let’s challenge ourself and try to optimise the space complexity of our approach to O(1).</p><p>What I understand is we are using two arrays to basically store the prefix product &amp; suffix products , what if we use the variable to store the prefix product and try to update the answer array itself instead of store prefix products in the new arrays .</p><p>See the below code for better understanding.</p><pre>class Solution {<br>    public int[] productExceptSelf(int[] nums) {<br>        int n = nums.length;<br>        int[] ans = new int[n];<br>        ans[0] = 1;<br>        for(int i=1 ; i&lt;n ; i++)<br>        {<br>            ans[i] = ans[i-1] * nums[i-1]; <br>        }<br>        int p = nums[n-1];<br>        for(int i = n-2 ; i&gt;=0 ; i--){<br>            ans[i] = ans[i] * p ;<br>            p = p * nums[i] ;<br>        }<br>        return ans;<br>    }<br>}</pre><p>I hope you understood the code and , it is just replacing the array with single variable and storing the intermediate products directly in the answer array.</p><blockquote>I hope you liked my content and my way of explaining answers with simple examples. From this week onwards , I would try to post three interview questions blogs in one week.</blockquote><blockquote>You can always follow my publication and motivate me with you claps and comments. For more interview questions check below page, there you will find related interview blogs.</blockquote><p><a href="https://medium.com/coding-becomes-easy">Coding made easy</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42541aac7515" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/product-of-array-except-itself-google-interview-question-42541aac7515">Product of array except itself | Google Interview Question</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find the median of running stream | Microsoft | Ola | Leetcode Hard]]></title>
            <link>https://medium.com/coding-becomes-easy/find-the-median-of-running-stream-microsoft-ola-leetcode-hard-d280cf350623?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/d280cf350623</guid>
            <category><![CDATA[ola]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Sat, 11 Nov 2023 03:05:42 GMT</pubDate>
            <atom:updated>2023-11-11T03:05:42.579Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B0sOwz088R002m6E" /><figcaption>Photo by <a href="https://unsplash.com/@linkedinsalesnavigator?utm_source=medium&amp;utm_medium=referral">LinkedIn Sales Solutions</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Hi guys, I will explain one of the famous leetcode questions i.e. <a href="https://leetcode.com/problems/find-median-from-data-stream/">Find Median from Data Stream</a>. This question is slightly difficult to grasp at first time, I recommend you take a notebook and pen with you to understand it in a better way.</p><p>Let’s start understanding the problem statement first.</p><pre>The median is the middle value in an ordered integer list. <br>If the size of the list is even, there is no middle value, <br>and the median is the mean of the two middle values.<br><br>For example, for arr = [2,3,4], the median is 3.<br>For example, for arr = [2,3], the median is (2 + 3) / 2 = 2.5.<br><br>Implement the MedianFinder class:<br><br>MedianFinder() initializes the MedianFinder object.<br>void addNum(int num) adds the integer num from the data stream to the data structure.<br>double findMedian() returns the median of all elements so far. Answers within 10-5 of the actual answer will be accepted.<br><br>Example 1:<br><br>Input<br>[&quot;MedianFinder&quot;, &quot;addNum&quot;, &quot;addNum&quot;, &quot;findMedian&quot;, &quot;addNum&quot;, &quot;findMedian&quot;]<br>[[], [1], [2], [], [3], []]<br>Output<br>[null, null, null, 1.5, null, 2.0]<br><br>Explanation<br>MedianFinder medianFinder = new MedianFinder();<br>medianFinder.addNum(1);    // arr = [1]<br>medianFinder.addNum(2);    // arr = [1, 2]<br>medianFinder.findMedian(); // return 1.5 (i.e., (1 + 2) / 2)<br>medianFinder.addNum(3);    // arr[1, 2, 3]<br>medianFinder.findMedian(); // return 2.0</pre><p>The question is quite self-explanatory, it is saying I will give you numbers one by one in an unsorted fashion, and at any time, I can ask you to give the median of numbers till now.</p><p>Stop the blog here, Take 10–15 minutes to think about any approach to solve the above problem, then scroll down to understand the solution.</p><p>Let’s think about a basic brute-force solution first. Let’s take the below example to understand.</p><p>eg : [4,3,2,1,9]</p><p>We can keep a list to store the numbers and when we are asked to find the median of the numbers till now, we can sort the list and give the middle element as the median (in case of odd length) and take an average of two middle numbers in case of even length.</p><pre>num = 4<br>add it to list<br>list = {4}<br><br>num 3 <br>add it to list<br>list = {4,3}<br><br>....<br>num = 9 <br>list = {4,3,2,1,9}<br><br>find median <br>sort the list {1,2,3,4,9}<br>get middle (3)<br><br>median = 3</pre><p><strong>Q: What is the time complexity here?</strong></p><p>A: Time complexity would be broken into two parts</p><p>For the worst-case, it would be O(n) + O(n*log(n)), O(n) is for adding n elements to the list, and O(n*log(n)) for sorting the list, ignoring time complexity of addition of elements in the list.</p><p>Time complexity for <strong>getMedian</strong> → O(n*Logn)</p><p><strong>Q: Can we optimize the above time complexity to O(1) constant time by using some data structure that gives sorting by default?</strong></p><p>A: Yes, We can utilize one of the great DS tools i.e Heap (PriorityQueue in Java)</p><p>To explain this solution, let me go over the basics of median first. See the below diagram, the median is the center element of the list.</p><p>In case 1 -&gt; We divided the list into two parts, the first half and the second half. we try to find the median by taking the max element from the first half and the min element from the second half and taking an average of both.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*l8NYoeEFq363zr2kSnXMJg.png" /></figure><p>In case 2 -&gt; Middle element, we can add in either the first part or the second part, in that case, median = Max(1st Half) or Min(2nd Half).</p><p>By the above example, we got one intuition that, we can use two heaps, one is max heap (representing first half -&gt; to find max element) and the other is min heap (representing second half -&gt; to find min element).</p><p>Imagine we have two heaps, max heap &amp; min heap.</p><p><strong>Example 1</strong>- nums=[5,4,1,10,3]</p><pre><br>Iteration 1 -&gt; (i=0 , num = 5)<br>Add 5 to maxHeap<br>maxHeap = [5]   , minHeap = []</pre><pre>Iteration 2 -&gt; (i=1 , num = 4)<br>Check 4 can fit in first half or second one , as 4 is less than 5 (max/top) of <br>max heap, it would fit in first half.<br>Add 4 to first half.<br><br>Wait! , we need to balance the maxHeap and minHeap here .<br><br>why?<br><br>what is median ? <br>if the length of maxHeap &amp; minHeap is equal means median is avg of top element of <br>maxHeap and minHeap.(even no of numbers)<br>if length(maxHeap) &gt; length(minHeap) , top element of maxHeap is the median vice <br>versa.<br>At any time , we need to maintain the max difference between sizes of minHeap <br>and maxHeap as 1 , as soon as it goes greater than 1 , we need to rebalance it.<br><br>I think you understood the reason of rebalancing here.<br><br>maxHeap = [5,4] , minHeap = []<br>Rebalance - remove top element from maxHeap add it to minHeap.<br>maxHeap = [4] , minHeap = [5]</pre><pre>Iteration 3 -&gt; (i=2 , num = 1)<br>maxHeap = [4] , minHeap = [5]<br><br>1 &lt; 4 , it would come in maxHeap.<br><br>maxHeap = [4,1] , minHeap = [5]<br><br>median = top(maxHeap) = 4 (since len(maxHeap) &gt; len(minHeap))</pre><pre>Iteration 4 -&gt; (i=3 , num = 10)<br>maxHeap = [4,1] , minHeap = [5]<br><br>10&gt;4 , so 10 can&#39;t fit in first half in maxHeap<br>we need to add it in second half that is minHeap.<br><br>maxHeap = [4,1] , minHeap = [5,10]<br><br>since lengths are equal <br><br>median = top(maxHeap) + top(minHeap) / 2 = (1 + 5) /2 = 3</pre><pre>Iteration 5 -&gt; (i=4 , num = 3)<br>maxHeap = [4,1] , minHeap = [5,10]<br><br>3 &lt; 4 , 3 in fit in firstHalf i.e in maxHeap<br><br>maxHeap = [4,3,1] , minHeap = [5,10]<br><br>median = top(maxHeap) = 4</pre><p>I think you clearly understand the logic behind the above solution , time complexity of this solution would be O(1) for finding median.</p><p>Let me add final code for the above approach.</p><pre>class MedianFinder {<br><br>    PriorityQueue&lt;Integer&gt; minHeap;<br>    PriorityQueue&lt;Integer&gt; maxHeap;<br><br>    public MedianFinder() {<br>        minHeap = new PriorityQueue&lt;&gt;();<br>        maxHeap = new PriorityQueue&lt;&gt;((a,b) -&gt; b-a);<br>    }<br>    <br>    public void addNum(int num) {<br>        if(maxHeap.isEmpty() || num &lt; maxHeap.peek()){<br>            maxHeap.add(num);<br>            if(maxHeap.size() - minHeap.size() &gt; 1){<br>                minHeap.add(maxHeap.poll());<br>            }<br>        }else{<br>            minHeap.add(num);<br>            if(minHeap.size() - maxHeap.size() &gt;= 1){<br>                maxHeap.add(minHeap.poll());<br>            }<br>        }<br>    }<br>    <br>    // 1 2 3<br>    public double findMedian() {<br>        double median = maxHeap.peek();<br>        if(maxHeap.size() - minHeap.size() == 0){<br>            median =  (median + minHeap.peek()) / 2;<br>        }<br>        return median;<br>    }<br>    <br>}<br><br>/**<br> * Your MedianFinder object will be instantiated and called as such:<br> * MedianFinder obj = new MedianFinder();<br> * obj.addNum(num);<br> * double param_2 = obj.findMedian();<br> */</pre><p>If you liked the explanation , feel free to clap 👏 and share the blog with your friends and colleagues ❤️.</p><p>You can add the comment , if you have any doubts. You can sync up with me for doubts , queries related to interview preparation (DSA , system design etc ) and mentorship here -&gt; <a href="https://topmate.io/ravi_shankar_bhatt">https://topmate.io/ravi_shankar_bhatt</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d280cf350623" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/find-the-median-of-running-stream-microsoft-ola-leetcode-hard-d280cf350623">Find the median of running stream | Microsoft | Ola | Leetcode Hard</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Google Interview Question: KoKo Eating Bananas]]></title>
            <link>https://medium.com/coding-becomes-easy/google-interview-question-koko-eating-bananas-920f7add3efc?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/920f7add3efc</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[amazon-interview]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[microsoft-interview]]></category>
            <category><![CDATA[google-interview]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Tue, 11 Apr 2023 06:41:27 GMT</pubDate>
            <atom:updated>2023-07-19T04:38:24.359Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>This is a famous interview question that is asked multiple times in product-based companies like Google, Amazon, and Microsoft.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0v5vMAIsdbrMOP5e" /><figcaption>Photo by <a href="https://unsplash.com/@erik_karits?utm_source=medium&amp;utm_medium=referral">Erik Karits</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Problem Description :</h3><p>Koko loves to eat bananas. There are n piles of bananas, and the ith pile has piles[i] bananas. The guards have gone and will come back in h hours.</p><p>Koko can decide her bananas-per-hour eating speed of k. Each hour, she chooses some pile of bananas and eats k bananas from that pile. If the pile has less than k bananas, she eats all of them instead and will not eat any more bananas during this hour.</p><p>Koko likes to eat slowly but still wants to finish eating all the bananas before the guards return.</p><p>Return <em>the minimum integer</em> k <em>such that she can eat all the bananas within</em> h <em>hours</em>.</p><p><strong>Example 1:</strong></p><pre>Input: piles = [3,6,7,11], h = 8<br>Output: 4</pre><p>Let me explain the above example to you →</p><p>If k = 3, i.e. per hour eating speed of Koko.</p><p>1st Pile(3) : 3<br>2nd Pile(6) : 3 + 3 <br>3nd Pile(7) : 3 + 3 + 1<br>4th Pile(11) : 3 + 3 + 3 + 2</p><p>Total Hours Spent = 1+2+3+4 = 10 hour</p><p>But the total time given is 8 hours, so Koko would not be able to finish the piles with speed = 3 bananas per hour</p><p>If k = 4</p><p>1st Pile : 3<br>2nd Pile : 4 + 2 <br>3nd Pile : 4 + 3<br>4th Pile : 4 + 4 + 3</p><p>Total Hours spent = 1 + 2 + 2 + 3 = 8 hours</p><p>Total time given = time spent, so the answer is k = 4.</p><h3>Intuition</h3><p>The first thing that comes to my mind here is to do a hit and trial with different k(eating speed per hour) values and check if Koko is able to eat all bananas or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FXqz7Meo0G2jbsQqDimZzg.png" /></figure><p>This is kind of a rough idea, that k’s value would be varying from a min point to a max point. It is a monotonous sequence where we need to minimize the k’s value.</p><p>What we can use here? Try to think once :)</p><h3>Approach</h3><p>Yes, correct, Binary search would be used here.</p><p><strong>Algorithm</strong> :</p><p>a). Create a method/function for checking if Koko is able to eat piles of bananas for the given k value or not.</p><p>b). Apply binary search on min k value to max k value and check if, for the kth speed, Koko is able to eat banana or not.</p><p>1) If Koko is able to eat a banana: Go to the left side of the binary search, for minimizing the kth value.</p><p>2). If Koko is not able to eat a banana: Go to the right side of the binary search.</p><h3>Complexity</h3><ul><li>Time complexity: O(n * log m), where m = maxPile — minPile, n = length of piles array.</li><li>Space complexity: O(1)</li></ul><h3>Code</h3><pre>class Solution {<br>    public int minEatingSpeed(int[] piles, int h) {<br>        long minPile = piles[0];<br>        long maxPile = piles[0];<br>        long sum = 0;<br>        if(piles.length == 1){<br>            if(piles[0] % h != 0){<br>                return piles[0] / h + 1;<br>            }<br>            return piles[0] / h;<br>        }<br>        for(int pile : piles){<br>            sum += pile;<br>            maxPile = Math.max(maxPile,pile);<br>        }<br>        minPile = sum / h;<br>        return (int)getMinEatingSpeed(piles,minPile,maxPile,h);<br>    }<br><br>    private long getMinEatingSpeed(int[] piles , long left , long right , int h ){<br>        long mid = 0;<br>        while(left &lt; right){<br>            mid = (left + right) / 2;<br>            if(canEatBananas(piles,mid,h)){<br>                right = mid;<br>            }else{<br>                left = mid + 1;<br>            }<br>        }<br>        return left;<br>    }<br><br>    private boolean canEatBananas(int[] piles , long k , int h){<br>        int hSpend = 0;<br>        for(int pile : piles){<br>            hSpend += pile / k;<br>            if(pile % k != 0){<br>                hSpend += 1;<br>            }<br>        }<br>        return hSpend &lt;= h;<br>    }<br><br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=920f7add3efc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/google-interview-question-koko-eating-bananas-920f7add3efc">Google Interview Question: KoKo Eating Bananas</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Interview Question: Work Break]]></title>
            <link>https://medium.com/coding-becomes-easy/work-break-problem-microsoft-54fb3b9e5f49?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/54fb3b9e5f49</guid>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[google]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Thu, 20 Jan 2022 21:43:19 GMT</pubDate>
            <atom:updated>2022-01-22T15:11:35.012Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this blog, we are going to see the one of the most asked question in the FAANG companies i.e work break problem.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8MjfJKthMnnkCanD_1SDg.png" /></figure><h4>Problem Statement :</h4><p>Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.</p><p><strong>Note</strong> that the same word in the dictionary may be reused multiple times in the segmentation.</p><p><strong>Understand the problem statement :</strong></p><p>The language of the question, is quite complex, let’s understand it with the help of some examples.</p><p><strong>Example 1:</strong></p><pre><strong>Input:</strong> s = &quot;javapython&quot;, wordDict = [&quot;java&quot;,&quot;python&quot;]<br><strong>Output:</strong> true<br><strong>Explanation:</strong> Return true because &quot;javapython&quot; can be segmented as &quot;java python&quot;.</pre><p><strong>Example 2:</strong></p><pre><strong>Input:</strong> s = &quot;applepenapple&quot;, wordDict = [&quot;apple&quot;,&quot;pen&quot;]<br><strong>Output:</strong> true<br><strong>Explanation:</strong> Return true because &quot;applepenapple&quot; can be segmented as &quot;apple pen apple&quot;.<br>Note that you are allowed to reuse a dictionary word.</pre><p><strong>Example 3:</strong></p><pre><strong>Input:</strong> s = &quot;catsandog&quot;, wordDict = [&quot;cats&quot;,&quot;dog&quot;,&quot;sand&quot;,&quot;and&quot;,&quot;cat&quot;]<br><strong>Output:</strong> false</pre><p>First, two examples are happy cases, you can understand these very easily, but example no 3 is a negative case, let me explain how its output became <strong>false.</strong></p><p>Combinations are :</p><pre>&quot;catsandog&quot;<br>1. &#39;cats&#39; , &#39;and&#39; , &#39;og&#39; <br>2. &#39;cat&#39; , &#39;sand&#39; , &#39;og&#39;</pre><pre>See here , &quot;og&quot; string not contained in word dictionary that is why , we can&#39;t break the string into parts so that each part contain in the dictionary.</pre><p>Now, try to solve this question by yourself, If you are stuck then you can scroll down and see the solution.</p><p>By seeing the first example of the problem, you may think like it is an easy question. But it is a leetcode medium/hard question.</p><p>Just the thing is that you need to think about more negative test cases.</p><p><strong>Hint 1 :</strong> The first hint is in the name of the problem itself, Word <strong>Break, </strong>you need to break the string and search in the list if it contains or not.</p><p>Basically, Break the problem into small sub-problems. (Recur****) , you may have got the idea, of how to approach the problem.</p><p><strong>Hint 2: </strong>Don’t use the list<strong>, </strong>think about a data structure that has a time complexity of O(1) for searching.</p><p><strong>Hint 3: </strong>See this example :</p><pre><strong>str</strong> = applepen<br><strong>dict</strong> = [ap,app,appl,ep,epen]</pre><p>There can be 8 substrings of “<strong>applepen</strong>” that start with “a” right?</p><pre>a , ap, app, appl , apple , applep , applepe , applepen</pre><p>For each substring, you need to check the subString matches with any word in the dictionary or not. If it matches then check for the remaining substring</p><p>See this example explanation of the approach →</p><pre>Input string = applepen<br><strong>List</strong> is [ap,app,appl,ep,epen]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NytEhiobofYZnSRt3WKw5w.png" /><figcaption>Example representation of the problem</figcaption></figure><p>Now, the approach is clear, For finding the solution, we check every possible prefix of that string in the dictionary of words, if it is found in the dictionary, then the <strong>recursive</strong> function is called for the remaining portion of that string. And, if in some function call it is found that the complete string is in the dictionary, then it will return true.</p><p>See the code for more clarity →</p><ol><li><strong>Recursion with memorization</strong></li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c029dfd1bd6819658381a06fdebcfc45/href">https://medium.com/media/c029dfd1bd6819658381a06fdebcfc45/href</a></iframe><p><strong>DP solution :</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffdbbbe08153fc4da01b2274ad37916b/href">https://medium.com/media/ffdbbbe08153fc4da01b2274ad37916b/href</a></iframe><p>If you want to try out this problem and see it running seamlessly in the browser itself then see the below link.</p><p><a href="https://replit.com/@RaviBhatt3/WordBreak#Main.java">WordBreak</a></p><blockquote>Thanks, Guys for reading this blog. I hope you have understood the problem and its solution.</blockquote><p><a href="https://medium.com/coding-becomes-easy/climbing-stairs-leetcode-problem-eb47885ea383">Climbing stairs leetcode problem</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54fb3b9e5f49" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/work-break-problem-microsoft-54fb3b9e5f49">Microsoft Interview Question: Work Break</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zeta Suite Interview Experience SDE2]]></title>
            <link>https://medium.com/coding-becomes-easy/zeta-suite-interview-experience-sde2-d0d512c8899c?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/d0d512c8899c</guid>
            <category><![CDATA[interview-experience]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[zeta]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Tue, 28 Sep 2021 04:31:17 GMT</pubDate>
            <atom:updated>2021-09-29T20:43:42.445Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I cleared Zeta Interview?</h3><blockquote>(Sep 2021) In this blog , I will be telling you about all the questions asked in Zeta interview and the learnings that I get from this interview.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bG7anOkPlIKLSSZ_gGqVIA.png" /></figure><h3><strong>How I get an interview invite from Zeta</strong></h3><p>Basically, I applied to Zeta Suite from the LinkedIn Jobs portal, as my prior experience was matching with the Zeta, So after few days, I got a call from Zeta HR for the interview, She asked me my current tech stack and given brief about Zeta Suite interview process (“Basically there is three-round for SDE-2 profile and each round is an elimination round, following is the brief about the rounds”).</p><ol><li>Problem-solving.</li><li>Low-Level design.</li><li>Cultural fit.</li></ol><h3>1. First round of interviews (Problem-solving)</h3><p>In this round, Basically, the interviewer asked me to give a basic introduction and past experiences and projects, I explained my projects very well. Then he shared me codeshare link and added a DS question in it.</p><p>This question was basically a <a href="https://leetcode.com/problems/climbing-stairs/">https://leetcode.com/problems/climbing-stairs/</a>(<a href="https://leetcode.com/problems/climbing-stairs/">climbing-stairs</a>)<strong>, </strong>that most of the guys would be able to solve, I would recommend you guys to try to solve this question once.</p><p>I gave a recursive solution to the interviewer and the interview told me to dry run the code with a basic input. I explained the question to him very well. Then he asked me about the time complexity of the code. As you know, the solution is solved by recursion so time complexity would be more. I just thought for a little bit and told him <strong>O(2 pow n) </strong>which was correct. Basically, he told me to optimize it. I told him two solutions upfront.</p><ol><li>Recursive DP.</li><li>Iterative DP.</li></ol><p>He basically code both the solutions and I wrote the code for both and explained him very well. If you want to go through all the three solutions to this problem then you can go through this blog.</p><p><a href="https://medium.com/coding-becomes-easy/climbing-stairs-leetcode-problem-eb47885ea383">Climbing stairs leetcode problem</a></p><p>After one day, I got a call from HR, that I have cleared the first round and after 2 days I scheduled 2nd round of interviews.</p><h3>2. Second <strong>round of interview: Low-level design round.</strong></h3><p>In this round, the Interviewer shared a google doc link in the chat window and there is one design question given in the document that is basically a cab sharing app design like OLA/UBER. There were some basic requirements given for this design and expectations were to design the database entities and relations among them, and as well as write the code to demonstrate some of the functionalities given in the document.</p><p>This is the exact question that was asked in the interview.</p><blockquote><strong>Problem Statement:</strong></blockquote><blockquote>We want to build a cab booking platform to allow a rider to book a cab.</blockquote><blockquote><strong>Details:</strong></blockquote><blockquote>The location is represented as a (x, y) coordinate.</blockquote><blockquote>Distance between two points (x1, y1) and(x2, y2) is sqrt((x1-x2)² + (y1-y2)²)</blockquote><blockquote>Platform has decided upon maximum distance a driver has to travel to pickup a rider.</blockquote><blockquote>A cab has only 1 driver.</blockquote><blockquote>Sharing of cab is not allowed between riders</blockquote><blockquote>There is a single type of cab</blockquote><blockquote>Please build an application that exposes following features to riders and drivers.</blockquote><blockquote>1. Register a rider.</blockquote><blockquote>2. Register a driver/cab</blockquote><blockquote>3. Update a cab’s location</blockquote><blockquote>4. A driver can switch on/off his availability</blockquote><blockquote>5. A rider can book a cab</blockquote><blockquote>6. Fetch history of all rides taken by a rider.</blockquote><blockquote>7. End the Trip</blockquote><blockquote><strong>Expectation from this round</strong></blockquote><blockquote>1. Demonstrable code is first expectation.</blockquote><blockquote>2. Code should be extensible.</blockquote><blockquote>3. Clean professional level code.</blockquote><blockquote>4. Functional Completeness including good modelling.</blockquote><p>Only thing is that I have to write the code on the google doc itself and I wrote a clean code and explained him whole functionality very well.</p><p>You can just try to solve these questions by yourself now. I will be uploading the solution to this question in the next blog.</p><h3>3. Third round of interview: Cultural Round</h3><p>This round is basically taken by the director of the particular team. He asked me about my projects and the role in which I was working in my last company. I explained about projects very well and he asked me a couple of questions regarding my projects as follows.</p><p><strong>Behavioral Questions</strong></p><ol><li>How do you come to the final approach to the problem?</li><li>What are the blockers, that have you faced while doing this project?</li><li>What is the release process in your company?</li><li>What is the most challenging project that you have done, and how do you face that challenge?</li></ol><p>…………..some more behavioral questions about projects and leadership skills.</p><p><strong>Technical Questions :</strong></p><ol><li>Can you explain the Java memory model?</li><li>What is the volatile keyword in java?</li><li>What do you about serialization?</li><li>Are you aware of NoSql (MongoDB)?</li><li>What is a factory design pattern?</li><li>What are the thread pools and the difference b/w the fixed thread pool and cached thread pool?</li></ol><p>I have answered almost all questions politely and got a call from HR the next day that I have cleared all rounds.</p><p>Reading does not stop here, feel free to check the uber interview experience here.</p><p><a href="https://medium.com/coding-becomes-easy/uber-interview-experience-sde-2-66725cf2f978">Uber interview experience SDE2</a></p><blockquote>Thanks you reading this blog . Hope you would have a better idea of zeta interview process and the questions asked.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d0d512c8899c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/zeta-suite-interview-experience-sde2-d0d512c8899c">Zeta Suite Interview Experience SDE2</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Climbing stairs leetcode problem]]></title>
            <link>https://medium.com/coding-becomes-easy/climbing-stairs-leetcode-problem-eb47885ea383?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb47885ea383</guid>
            <category><![CDATA[leetcode-medium]]></category>
            <category><![CDATA[dynamic-programming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[problem-solving]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Sat, 25 Sep 2021 10:49:37 GMT</pubDate>
            <atom:updated>2021-09-27T05:54:53.887Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Hi forks , In this blog I will be going through on of the most asked problem in the interview i.e Climbing Stairs .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8PWCZcMKFRadpS-p" /><figcaption>Photo by <a href="https://unsplash.com/@opak?utm_source=medium&amp;utm_medium=referral">Ruffa Jane Reyes</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>Question</strong> :</p><blockquote>You are climbing a staircase. It takes <em>n</em> steps to reach the top.Each time you can either climb <em>1</em> or <em>2</em> steps. In how many distinct ways can you climb to the top?</blockquote><p><strong>Example 1:</strong></p><pre><strong>Input:</strong> n = 2<br><strong>Output:</strong> 2<br><strong>Explanation:</strong> There are two ways to climb to the top.<br>1. 1 step + 1 step<br>2. 2 steps</pre><p><strong>Example 2:</strong></p><pre><strong>Input:</strong> n = 3<br><strong>Output:</strong> 3<br><strong>Explanation:</strong> There are three ways to climb to the top.<br>1. 1 step + 1 step + 1 step<br>2. 1 step + 2 steps<br>3. 2 steps + 1 step</pre><p>I recommend you guys to just go through the question first and try to solve this question in leetcode and for hints, you can scroll down.</p><p><a href="https://leetcode.com/problems/climbing-stairs/">Climbing Stairs - LeetCode</a></p><p><strong>Solution Idea:</strong> There are n steps, you can either go one step at a time or two steps right. If you design the recurrence relation for this question it would be</p><h4>T(n) = T(n-1) + T(n-2)</h4><p>T(2) = T(1) + T(0) = 1 + 0 = 1</p><p>The base case would be if (n ==1 || n==0) then no of ways would be 1 and another case would be if(n &lt; 0) no of ways would be zero.</p><p>Let’s solve this question with the basic recursion solution.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d45fa53dc275b95ef36896be326844bf/href">https://medium.com/media/d45fa53dc275b95ef36896be326844bf/href</a></iframe><p>Here, If you see it clearly it takes O(2 ^ n ) time to calculate the no of ways to climb the staircase.</p><p>Let’s apply Recursive DP to optimize this solution to O(n).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/807f05b722dbaf27acaae39db2336231/href">https://medium.com/media/807f05b722dbaf27acaae39db2336231/href</a></iframe><p>Here above, I have added a solution for iterative DP also. In DP, just we need to check, how many variables are dynamic/Changing. Here we clearly see one variable i.e n is dynamic throughout the code. So we need to take one dimensional Array to store the results for reaching each step.</p><p>As we already know, for reaching 0 &amp; 1 step there is only one way so,</p><blockquote>mem[0] = 1 , mem[1] = 1</blockquote><p>Now we know for reaching 2 steps either we can take 1 step or 2 steps directly.</p><blockquote>mem[2] = mem[2–1] + mem[2–2] = mem[1] + mem[0] = 1 + 1 = 2 ways.</blockquote><p>In that way, we can loop through the n elements and mem[n] would be the answer finally.</p><p>I hope you would have got a clear idea about the question and all three solutions. Reading not stops here, You can go through the <a href="https://medium.com/coding-becomes-easy/uber-interview-experience-sde-2-66725cf2f978"><strong>uber interview experience</strong></a> here.</p><blockquote>Thanks Guys , for reading this blog and give a clap if you liked the blog and if you have any questions , you can comment on this blog , I will happy to help you.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb47885ea383" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/climbing-stairs-leetcode-problem-eb47885ea383">Climbing stairs leetcode problem</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Uber interview experience SDE2]]></title>
            <link>https://medium.com/coding-becomes-easy/uber-interview-experience-sde-2-66725cf2f978?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/66725cf2f978</guid>
            <category><![CDATA[uber]]></category>
            <category><![CDATA[leetcode]]></category>
            <category><![CDATA[interview-preparation]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[programming-interviews]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Fri, 24 Sep 2021 08:45:12 GMT</pubDate>
            <atom:updated>2021-09-27T05:53:24.475Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>(SEP 2020) This is my interview experience with Uber, I will tell each and everything starting with getting a call from the recruiter and ending with the interview.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LtfeVogC9da61OjV.jpg" /><figcaption>Angela Lang/CNET</figcaption></figure><h4>How do I get a call from Uber?</h4><p>This is kind of a long story, as I applied to Uber plenty of times from the Uber career page. But surprisingly, I didn’t get a call from Uber for a long time. I hadn’t lost hope and tried checking in LinkedIn and one day I found a post on LinkedIn for referral and I shared my email id and then finally, I got a call from a recruiter for the interview.</p><p><strong>First Round of Interview :</strong></p><p>Now, Comes on the day of the interview. For a clear understanding, I am naming the interviewer as John and the interviewee as Ravi.</p><p><strong><em>John</em></strong>: <em>Hey Matt, How do you represent a terrain containing land and water.</em></p><p><strong><em>Ravi</em></strong>: <em>Yes Sure, We can save it in the integer matrix containing zero and one where land means 1 and water means 0.</em></p><p><strong><em>John: </em></strong><em>Can you optimize it in terms of time and space complexity, as to get all lands you need to iterate through the whole matrix?</em></p><p><strong><em>Ravi: </em></strong><em>Yes, We can think of a data structure like HashMap where we can store Location as the key and value as 1 or 0. In that way, we can easily get a point is land or not in O(1).</em></p><p><strong><em>John:</em></strong> <em>Do you need to store the water also, let’s say the query is to get all the lands and check if the point is land or not?</em></p><p><strong><em>Ravi</em></strong><em>: Got it, We don’t need to store water points here, just storing the lands would suffice. We can use HashSet to store all the land points.</em></p><p><strong><em>John: </em></strong><em>Nice, Now we can do the following queries in O(1) time.</em></p><blockquote>isLand(Point point) , getLands() , addLand(Point point);</blockquote><p><em>Ravi, Can you implement these methods, Run the query for simple inputs.</em></p><p><strong>So, Basically, I implemented these methods and gave a demo of these methods to John.</strong></p><p>Now, John is happy but he has some follow-up questions on existing implementation. He asked me, for the addLand method, if there are two points added with the same x and y coordinates, how your implementation solves this.</p><p><strong><em>Ravi: </em></strong><em>I can write the hashCode and equals method for the Point class, which will solve this problem.</em></p><p><strong><em>John: </em></strong><em>Ok fine, Can you add some more functionality like getting the </em><strong><em>total no of islands.</em></strong></p><p>I recommend you to solve this question from the leetcode <a href="https://leetcode.com/problems/number-of-islands/">https://leetcode.com/problems/number-of-islands/</a>.</p><p><strong><em>Ravi: </em></strong><em>I can simply do the BFS/DFS on the grid and count the no of islands.</em></p><p><strong><em>John</em>: </strong><em>Can you optimize it, Just think you added 10 points to the grid now you called </em><strong><em>getNoOfIslands</em></strong><em>(), it will basically take O(n) time to count right.</em></p><p><em>Now you added one more point to the grid and again ask for </em><strong><em>getNoOfIslands</em></strong><em>(), again you take O(n) time, If one time you calculated no of islands, then next time while adding the island only, you can just check whether it forms an island or not. Next time it should take just O(1) time.</em></p><p><strong><em>Ravi: </em></strong><em>Yes, We can check on all the four directions whether there is land or not, if there is no land in any of the surroundings then just increment the noOfIsland by 1.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*y92pbIKzvEN0FZub5OscVA.png" /></figure><p>Check for unique lands(belong to diff islands (n)) in the four directions, in the first diagram there are two unique lands in the surrounding, so we need to decrement the island by (n-1 = 1), so now islands will become 2. And we need to color the two islands the same color.</p><p><strong><em>John: </em></strong><em>I understand the solution but don’t you think coloring the islands will take time in the algorithm, can you optimize it more.</em></p><p>Here, I recommend you all to solve <a href="https://leetcode.com/problems/coloring-a-border/">https://leetcode.com/problems/coloring-a-border/</a> from leetcode to get better clarity.</p><p>I was able to write the normal solution which was not so optimized. But you check the disjoint set algorithms to optimize it more.</p><p>Finally, the Next day I got a call from the recruiter that, I am not selected. The takeaway from this interview is that you should be clear about the graphs all algorithms and try to optimize the best solutions also.</p><p>Reading doesn’t stop here. You can go through the famous interview question <a href="https://medium.com/coding-becomes-easy/climbing-stairs-leetcode-problem-eb47885ea383">Climbing Staircase problem</a>.</p><blockquote>Thanks for reading this blog , I hope you liked this blog and use this blog as a preparation material for your upcoming Uber interview.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66725cf2f978" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/uber-interview-experience-sde-2-66725cf2f978">Uber interview experience SDE2</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interview Question: How to implement custom LinkedList in Java?]]></title>
            <link>https://medium.com/coding-becomes-easy/interview-question-how-to-implement-custom-linkedlist-in-java-734feb31ffac?source=rss-f54fa7a52a05------2</link>
            <guid isPermaLink="false">https://medium.com/p/734feb31ffac</guid>
            <category><![CDATA[linked-lists]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[singly-linked-list]]></category>
            <category><![CDATA[linked-list-cycle]]></category>
            <category><![CDATA[interview-questions]]></category>
            <dc:creator><![CDATA[Ravi Bhatt]]></dc:creator>
            <pubDate>Thu, 20 May 2021 21:12:00 GMT</pubDate>
            <atom:updated>2021-05-20T21:12:00.585Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Hi Guys, This is the first blog in the Data Structure and Problem solving section of my publication. I thought of explaining data structures in a question-answer way. In this blog, step by step we will create our own custom LinkedList in JAVA.</blockquote><p><strong>Best Example of LinkedList in Real Life :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*NeFdvm26O_FKPyXsny97MA.jpeg" /><figcaption>Kids Holding Hands an example of LinkedList</figcaption></figure><p>As you see in the above picture, Kids holding hands with each other is the best example of <strong>LinkedList</strong> in practical life. If red shirt and the blue short kid is head then to get the 4th kid with the light blue shirt, you need to iterate from the head to the 4th kid one by one, as a first kid knows the next kid address then next and so on.</p><p>As you know, We already have a LinkedList class in <strong>java. util</strong> package in JDK that has the following methods.</p><pre>public void addFirst(E e);<br>public void addLast(E e);<br>public int size();<br>public boolean remove(Object o);</pre><p>Let’s try to implement these basic functionalities in our Custom LinkedList.</p><p><strong>Step 1:</strong> We need to create a CustomLinkedList class.</p><p><strong>Step 2:</strong> Add the Node inner class, in which we have two parameters i.e value and reference to the next node.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0982f93ea14b7d92b6511f8b4a0137d5/href">https://medium.com/media/0982f93ea14b7d92b6511f8b4a0137d5/href</a></iframe><p>Please note, here we are creating a Generic LinkedList. that is why I have added the &lt;E&gt; symbol after the CustomLinkedList.</p><blockquote><strong>Interview Tip:</strong> <em>generics can be asked by the interviewer frequently.</em></blockquote><blockquote><em>Giving a brief introduction about </em><strong><em>generics</em></strong><em> here by one example.</em></blockquote><blockquote>CustomLinkedList&lt;String&gt; ll = new CustomLinkedList&lt;&gt;();<br>ll.addAtLast(&quot;Ravi&quot;);<br>ll.addAtLast(40); // compilation error</blockquote><blockquote>Error:(11, 25) java: incompatible types: int cannot be converted to java.lang.String</blockquote><blockquote><em>Here, the Benefit of generic is that It restricts the user from adding the wrong type in the CustomLinkedList, Type Safty is the benefit of generics.</em></blockquote><p><strong>Step 3: </strong>Now, add the <strong>head</strong> and <strong>tail</strong> references inside the CustomLinkedList class.</p><p>I am tail node just to make the time complexity <strong>O(1)</strong> while inserting at last of the LinkedList.</p><p>Assume, You have not added the tail node, now if you have added 100 elements in your Linked List and now, you want to add 101th element, as you have the head of the linked list, you will iterate till last and then add 101th element. Here time complexity is O(n) which is not good.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e2071d4b075ab30b15367385ca1a4572/href">https://medium.com/media/e2071d4b075ab30b15367385ca1a4572/href</a></iframe><p>Congrats, If you reached this step, as we have completed 50% of the part of the creation of Custom Linked List.</p><p><strong>Step 4:</strong></p><p>Implement addAtFirst() of the CustomLinkedList. It is quite simple.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/320253349870943a7eb04ff298674a0d/href">https://medium.com/media/320253349870943a7eb04ff298674a0d/href</a></iframe><p>Think about it, we have head and tail null at the starting.</p><ol><li>When we want to add elements at first let’s say 40, we need to create a new node object and now create a link by doing <strong>temp. next = head</strong></li><li>Now the head is pointing to null (40-&gt;null), but the head should be pointing to starting of the linked list so, head = temp.</li></ol><blockquote>40 -&gt; null</blockquote><blockquote>||</blockquote><blockquote>head</blockquote><p>3. Tail should have a reference of the last element if it is null till now, that’s why I wrote: <strong>if the tail is null then tail = temp</strong>.</p><p><strong>Step 4 :</strong></p><p>Implement <strong>addLast()</strong> method for the CustomLinkedList.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b90604a1fb4f3e08762c189017beba4/href">https://medium.com/media/7b90604a1fb4f3e08762c189017beba4/href</a></iframe><p>Here, when we are adding the first node at the end of the linked list, we need to check if the tail is null or not.</p><p>If the tail is null that means it is the first node that you are going to add, so we can call the <strong>addAtFirst()</strong> method to add the first node. Now, for the next node , we create a node object with the value given and save it as a <strong>temp</strong>. Now, we can just add created node to the next tail and move the tail to the end by assigning it a <strong>temp</strong> node.</p><p><strong>Voila!</strong> We have Just done custom LinkedList implementation in java. Now, See below the full working code of <strong>CustomLinkedList</strong> with <strong>display()</strong> method to print complete LinkedList in the console.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c4e5df23c6722c7961ba1ad957b79ce5/href">https://medium.com/media/c4e5df23c6722c7961ba1ad957b79ce5/href</a></iframe><p>Congratulations! If you have read this blog till this point. Then you can create a new functionality easily in Java.</p><blockquote>If you have noticed , I didn’t cover <strong>remove(Object o)</strong> method implemention in this blog . Here is the deal !</blockquote><blockquote><strong>This is assignment for you that you have to write the code of remove method for the custom linked list , remove method should remove the first occurrence of object O .</strong></blockquote><blockquote>You can comment on this blog ,with your remove method code. I will really appreciate you . If you do this assignment.</blockquote><p>Please clap on this blog at least 50 times and follow the “Coding becomes easy” publication for updates regarding upcoming blogs.</p><p><strong>Stay Home! Stay Safe! Stay Connected! As covid-19 spreading around the globe.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=734feb31ffac" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coding-becomes-easy/interview-question-how-to-implement-custom-linkedlist-in-java-734feb31ffac">Interview Question: How to implement custom LinkedList in Java?</a> was originally published in <a href="https://medium.com/coding-becomes-easy">Coding made easy</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>