<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: DFS With Memo</title>
    <description>The latest articles on Forem by DFS With Memo (@dfs_with_memo).</description>
    <link>https://forem.com/dfs_with_memo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F908793%2F16d11e8b-00dd-42ff-b001-6b1d422d3ba8.png</url>
      <title>Forem: DFS With Memo</title>
      <link>https://forem.com/dfs_with_memo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dfs_with_memo"/>
    <language>en</language>
    <item>
      <title>Must know beginner algorithms</title>
      <dc:creator>DFS With Memo</dc:creator>
      <pubDate>Sun, 25 Jun 2023 21:43:32 +0000</pubDate>
      <link>https://forem.com/dfs_with_memo/leetcode-algorithms-beginner-problems-part-2-1f0a</link>
      <guid>https://forem.com/dfs_with_memo/leetcode-algorithms-beginner-problems-part-2-1f0a</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this post I will list warm up problems that will help you get a sense of the algorithm. I highly recommend you to solve the problems in my &lt;a href="https://dev.to/dfs_with_memo/leetcode-warmup-problems-13o7"&gt;previous post&lt;/a&gt; before solving the problems here.&lt;/p&gt;

&lt;p&gt;I have noted things you should keep in mind when thinking about the algorithm. This is not an exhaustive list. To have a good interview you need regular and consistent practice with a dash of luck.&lt;/p&gt;

&lt;p&gt;I hope the list of problems here would help you ease into solving Leetcode style problems and allow you to form a habit of problem solving which you can then use to solve more difficult problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of contents
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Two pointers&lt;/li&gt;
&lt;li&gt;Binary Search&lt;/li&gt;
&lt;li&gt;Sliding Window&lt;/li&gt;
&lt;li&gt;Sorting&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Topics
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Two pointers &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Two pointers usually work by having two variables, one that is at the start of the array and another at the end. There would be some logic that would move the start pointer to the left and the end pointer to the right. The algorithm terminates when the two pointers cross over.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/reverse-string/"&gt;Reverse String&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/is-subsequence/"&gt;Is subsequence&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-palindrome/"&gt;Valid palindrome&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/squares-of-a-sorted-array/"&gt;Squares of sorted array&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Binary Search &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Binary search is a special type of two pointer algorithm. It's  an algorithm that searches over a solution space drastically reducing(by half) the space in every iteration. &lt;/p&gt;

&lt;p&gt;One of the main goals of solving these type of problems is to become familiar is how to use binary search. It may not always be apparent because you have to apply binary search with another data set which may not be your input data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-search/"&gt;Binary Search&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-perfect-square/"&gt;Valid perfect squre&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/sqrtx/"&gt;Sqrt(x)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/first-bad-version/"&gt;First Bad Version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/sum-of-mutated-array-closest-to-target/"&gt;Sum of mutated array closest to target&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Sliding Window &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The sliding window technique is used for solving problems that deal with contiguous subarrays such as finding the minimum subarray size that adds up to a given target sum. &lt;/p&gt;

&lt;p&gt;Sliding window is useful in situations where you don't want to recompute everything inside the window. Here I provide few easy problems and (easy) medium level problems that can be solved with sliding window.&lt;/p&gt;

&lt;p&gt;A common question that comes to mind is what is the difference between sliding window and two pointers? Both algorithms require two variables to track indices. How I like to see it is that, in sliding window we are concerned with the elements within the window whereas in two pointers we are concerned with the elements that the two variables are pointing at.&lt;/p&gt;

&lt;p&gt;It's a pet peeve of mine when people mention two pointers and do a sliding window.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/maximum-average-subarray-i/"&gt;Maximum Average Subarray 1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/contains-duplicate-ii/"&gt;Contains Duplicate 2&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/longest-substring-without-repeating-characters/"&gt;Longest Substring Without Repeating Characters&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/minimum-size-subarray-sum/"&gt;Minimum sub-array sum&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/minimum-size-subarray-sum/"&gt;Minimum size subarray sum&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Sorting &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Many problems become easier to solve when you sort the data. Sometimes you might have to use sorting in an innovative way. For these types of problems, you should be familiar with how to use the in-built sort function in your programming language. &lt;/p&gt;

&lt;p&gt;It's not mandatory to know how to implement your own sorting algorithm but you should be familiar with the merge helper function used by merge sort and the partition helper function used by quick sort as these helper functions can be used in different problems. If you know these two helper functions, you should be able to implement quick sort and merge sort.&lt;/p&gt;

&lt;p&gt;Another sorting algorithm is &lt;a href="https://www.geeksforgeeks.org/counting-sort/"&gt;Counting sort&lt;/a&gt; which let's you sort data in O(n) time.&lt;/p&gt;

&lt;p&gt;It is critical to know the time complexities of different sorting algorithms as well as the sorting algorithm used by the in-built sorting function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/sort-colors/"&gt;Sort Colors&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-anagram/"&gt;Valid Anagram&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/relative-ranks/"&gt;Relative ranks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/sort-array-by-parity/"&gt;Sort Array by Parity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/relative-sort-array/"&gt;Relative sort Array&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/maximum-units-on-a-truck/"&gt;Maximum Units on a Truck&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>interview</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>My Bloomberg interview experience</title>
      <dc:creator>DFS With Memo</dc:creator>
      <pubDate>Sat, 24 Sep 2022 15:42:56 +0000</pubDate>
      <link>https://forem.com/dfs_with_memo/my-bloomberg-interview-experience-5nb</link>
      <guid>https://forem.com/dfs_with_memo/my-bloomberg-interview-experience-5nb</guid>
      <description>&lt;h2&gt;
  
  
  Interview Experience
&lt;/h2&gt;

&lt;p&gt;I applied for a SWE role(not a new grad) and heard back from a Bloomberg recruiter in April. I scheduled my first technical phone screen three weeks from the time I was contacted.&lt;/p&gt;

&lt;p&gt;Technical phone screen 45 minutes - My interviewer asked me questions on my resume for around 15 minutes and then gave me a variation of number of islands.&lt;/p&gt;

&lt;p&gt;The next day I was contacted by my recruiter and I was informed I will be moving to the next round which is a virtual on-site that consists of technical rounds. I was asked to keep 3-4 hours aside for the rounds but I wasn't told how many rounds and what kind except that the first will be a technical round.&lt;/p&gt;

&lt;p&gt;My virtual on-site started at 11am a week later. The first round was indeed a technical round with two interviewers. One of them was shadowing the main interviewer. My interviewer was nice, he introduced himself and gave me a brief overview of how the interview would be structured. Then we spent 15 minutes on my resume to understand what type of work I had done and what I am currently working on, what are my technical interests etc. We moved to the first problem. It was a very verbose problem on handling requests in the front office of a trading desk and it had multiple requirements. I saw that all of the requirement aligned with implementing a min stack so I explained that to the interviewer. &lt;/p&gt;

&lt;p&gt;He was happy and allowed me to code up the solution. He asked me for the time complexity of each function and we discussed a bit on some of the edge cases. He gave me another problem on balanced parenthesis which was straightforward enough on the first attempt and I told him a stack approach. He was satisfied and I coded it up. &lt;/p&gt;

&lt;p&gt;He gave me a follow up to solve it without using a stack. I struggled a bit here and he was trying to nudge me in the right direction. I came up with an O(n^2) algorithm but he pushed me to give him a O(n) and constant space solution which I finally was able to come up with. The interviewer was quite satisfied and we ended there. It took about 1 hour. He told me I will have one more round in half an hour.&lt;/p&gt;

&lt;p&gt;My next interviewer showed up in 15 minutes and he told me that he can wait for 15 more minutes because he was early. I told him that I am ready. We spoke for around 10 minutes about my resume and the he gave me the first question which was a variation of all paths from source to destination. &lt;/p&gt;

&lt;p&gt;I was able to come up with the solution quite easily and coded it up. Then he asked me the time complexity and I really struggled with it though it wasn't complicated at all. He had to finally tell me. We spent the same amount of time on the time complexity as that on the actual problem. My mind was kind of fried at that time. &lt;/p&gt;

&lt;p&gt;Since we had time, he gave me another problem involving hashmaps (it is one of the most frequently asked questions in Bloomberg). I was able to solve it because I had done the problem before and we finished before time. He informed me that I have an HR round in 45 minutes.&lt;/p&gt;

&lt;p&gt;HR round - lasted for 30 minutes and again I was asked about my previous work experience, how many people I would interact with, did I work with stakeholders, why am I doing a master's now and why in the US etc. The HR told me that I am done with the virtual on-site and my recruiter will let me know on the next steps&lt;/p&gt;

&lt;p&gt;It was a while, I don't remember the exact time but I was contacted by my recruiter and they let me know that I had one more round this time with an engineering manager. I scheduled it for a week from the date I was informed.&lt;/p&gt;

&lt;p&gt;EM round - This was taken a very senior manager at Bloomberg(&amp;gt;25 YOE at Bloomberg). He wanted to know about my experience with different programming languages. He asked me to differentiate between C++,Python and Java, asked couple of standard behavioral questions and gave me advice on how to succeed as an engineer at Bloomberg.&lt;/p&gt;

&lt;p&gt;I was contacted by a different HR a week later and was told they are giving me a verbal offer.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I prepared
&lt;/h2&gt;

&lt;p&gt;I had solved problems from Cracking the Coding Interview on Leetcode, solved majority of blind 75 problems and I had collected questions asked in previous Bloomberg interviews from leetcode discuss section and geeksforgeeks to prepare. &lt;/p&gt;

&lt;p&gt;I had started solving Leetcode problems from December end of last year(2021) and my final LC count(if that matters) on the day of my virtual on-site was 289.&lt;/p&gt;

&lt;p&gt;If you are starting from scratch - consider checking out my &lt;a href="https://dev.to/dfs_with_memo/leetcode-survival-guide-1cp3"&gt;Leetcode survival guide&lt;/a&gt; where I have listed out the important topics you need to know and links to helpful learning and practice material.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Leetcode data structures beginner problems</title>
      <dc:creator>DFS With Memo</dc:creator>
      <pubDate>Thu, 08 Sep 2022 15:58:35 +0000</pubDate>
      <link>https://forem.com/dfs_with_memo/leetcode-warmup-problems-13o7</link>
      <guid>https://forem.com/dfs_with_memo/leetcode-warmup-problems-13o7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;It's recruiting season. Be it that you are an experienced professional looking to make it big in top tech companies or students who are starting their career. Chances are you have to brush up your data structures and algorithms(DSA) knowledge in order to nail the technical interviews. &lt;/p&gt;

&lt;p&gt;You may be tempted to enroll in an expensive online course or buy a thick book on data structures and algorithms but hear me out.&lt;/p&gt;

&lt;p&gt;If you are someone who had in the past, taken a DSA course, chances are you already know or have some faint idea about the subject. Instead of re-learning everything from scratch, I would advise you to solve problems on Leetcode that are based on these data structures in order to refresh your memory. This has two benefits&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You will get a chance to refresh your knowledge&lt;/li&gt;
&lt;li&gt;You will get a feel for how to solve Leetcode problems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this post, I will provide links to such problems that should give you a good start. If you are starting from 0, I would suggest reading my &lt;a href="https://dev.to/dfs_with_memo/leetcode-survival-guide-1cp3"&gt;Leetcode survival guide&lt;/a&gt;. It contains resources to learn the main DSA topics and problem lists(like this one) to effectively prepare for your interviews.&lt;/p&gt;

&lt;p&gt;In no way these problems are enough to clear your technical interviews but they form a good spring board to ease into problem solving. Each section contains short notes on what you should focus on that particular data structure. Don't expect to be able to solve all the problems on your own. Though the problems are marked as easy, it can be daunting for first-timers. If you are spending more than 30 minutes trying to come up with your solution, please look at the discuss section or watch a video. Understand the solution well and code it up. Ensure that you digest the "pattern" or the trick that is used to solve the problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of content
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Array&lt;/li&gt;
&lt;li&gt;String&lt;/li&gt;
&lt;li&gt;Linked List&lt;/li&gt;
&lt;li&gt;Stack&lt;/li&gt;
&lt;li&gt;Queue&lt;/li&gt;
&lt;li&gt;Hash Map&lt;/li&gt;
&lt;li&gt;Priority Queue&lt;/li&gt;
&lt;li&gt;Tree&lt;/li&gt;
&lt;li&gt;Binary Search Tree&lt;/li&gt;
&lt;li&gt;Graph&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Array &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Arrays though basic are very versatile data structures. Arrays are the fastest way to access elements. You should be comfortable searching and manipulating values in arrays. A frequent mistake is off by one errors when indexing arrays.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/longest-continuous-increasing-subsequence/"&gt;Longest Continuous Increasing Subsequence&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/merge-sorted-array/"&gt;Merge sorted array&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/find-the-difference-of-two-arrays/"&gt;Difference of two arrays&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/shift-2d-grid/"&gt;Shift 2D grid&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/range-sum-query-immutable/"&gt;Range Sum Query-Immutable&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/move-zeroes/"&gt;Move Zeroes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/remove-element/"&gt;Remove element&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/pascals-triangle/"&gt;Pascal's Triangle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-sudoku/"&gt;Valid Sudoku&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/find-winner-on-a-tic-tac-toe-game/"&gt;Find Winner on a Tic Tac Toe game&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are many data structures such as heap, segment trees and disjoint set union whose underlying implementation uses arrays. Knowing different applications, advantages, disadvantages of arrays will elevate your knowledge. A common optimization in algorithms is to substitute Hash Maps with fixed length arrays and using the index of arrays as the key.&lt;/p&gt;

&lt;h3&gt;
  
  
  String &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Strings in it's most base form is just an array of characters. Usually problems involving strings would be limited to lower-case or upper-case characters. It is always a good idea to clarify with your interviewer what type of characters are present in the input string. You should be familiar with common string operations in your language such as concatenation, checking the character at a particular index and replacing a character at a particular index. Java programmers should know how to use StringBuilder class.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/fizz-buzz/"&gt;Fizz Buzz&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/shortest-word-distance/"&gt;Shortest word distance&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/student-attendance-record-i/"&gt;Student attendance record&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/calculate-digit-sum-of-a-string/"&gt;Calculate digit sum of string&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/longest-common-prefix/"&gt;Longest common prefix&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Linked List&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Interview problems on Linked Lists mainly tests you ability to detect edge cases. In introductory DSA courses, this is where you first get introduced to pointers. The problems are tricky because you can move in one direction. Don't be surprised to get null pointer exceptions when solving Linked List problems. &lt;/p&gt;

&lt;p&gt;Be familiar with how to traverse linked lists, add and remove elements. If your programming language of choice provides a linked list implementation, know the function calls that are supported.&lt;/p&gt;

&lt;p&gt;A popular form of the Linked List is the Doubly Linked List. A traditional Linked List only has a "next" pointer which points to the next element in the list. A doubly linked list has two pointers, "next" which points to the next element and "prev" which points to the previous element in the list. &lt;/p&gt;

&lt;p&gt;Once you solve problems from Linked List and Hash Maps, I encourage you to solve this popular interview problem &lt;a href="https://leetcode.com/problems/lru-cache/"&gt;LRU cache&lt;/a&gt;. This is the toughest problem in the list but it illustrates how you can combine known data structures to solve existing problems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/reverse-linked-list/"&gt;Reverse Linked List&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/middle-of-the-linked-list/"&gt;Middle of Linked List&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/merge-two-sorted-lists/"&gt;Merge Two Linked List&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/linked-list-cycle/"&gt;Linked List cycle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/remove-linked-list-elements/"&gt;Remove Linked List Elements&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/delete-node-in-a-linked-list/"&gt;Delete Node in a Linked List&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Though it's slow to access elements in Linked Lists(you should understand why) compared to arrays, adding elements to the end of the Linked List and removing elements from Linked Lists are faster compared to arrays(again you should understand why). Linked Lists can dynamically grow which is helpful when you don't know the size of your lists. Linked Lists can act as helper data structures to implement other data structures such as queues and graphs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stack&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Stacks though simple are amazing data structures. This section contains problems which will expose you to different ways stacks are used. Many problems, especially string problems can be converted into a stack problem. To solve such problems you need to mainly understand the common stack operations such as push, pop, peek and check for empty stack.  &lt;/p&gt;

&lt;p&gt;If there is an in-built stack class in your language, make sure you are familiar with the common functions. If not, ensure you can easily implement the stack.&lt;/p&gt;

&lt;p&gt;Keep in mind to always check for empty stack when popping from the stack. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/min-stack/"&gt;Min stack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-parentheses/"&gt;Valid Parentheses&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/"&gt;Remove All Adjacent Duplicates in a string&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/evaluate-reverse-polish-notation/"&gt;Evaluate reverse polish notation&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Queue
&lt;/h3&gt;

&lt;p&gt;Queues are a first in first out data structure. Though problems are limited, queues provide a very specific function and that is to track what came first. Many of the points regarding stack applies to queues. Be familiar with the common operations and if there is any in-built support for a queue in your programming language know the functions well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/number-of-recent-calls/"&gt;Number of Recent Calls&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/implement-stack-using-queues/"&gt;Implement Stack using queues&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/implement-queue-using-stacks/"&gt;Implement Queue using stack&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/design-circular-queue/"&gt;Design Circular Queue&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Hash Map&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Hash Maps are versatile data structures providing constant time searches, inserts, deletes and look ups. A popular interview question asks you to implement your own hash maps and I would recommend checking out the following videos from MIT open course-ware to understand how Hash Maps are implemented. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=0M_kIqhwbFo"&gt;Hashing with chaining&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=BRO7mVIFt08"&gt;Table doubling, Rabin Karp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Pro tip: Watch at 1.25x speed&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A variation of the Hash Map is the Hash Set. It's important to know the difference between the two and when to use the Hash Map over the Hash Set.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/design-hashmap/"&gt;Design HashMap&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/contains-duplicate/"&gt;Contains Duplicate&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/two-sum/"&gt;Two Sum&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/first-unique-character-in-a-string/"&gt;First Unique Character in a String&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/happy-number/"&gt;Happy Number&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/valid-anagram/"&gt;Valid Anagram&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/ransom-note/"&gt;Ransom Note&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/unique-morse-code-words/"&gt;Unique morse code words&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Heap/Priority Queues&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;A heap is a data structure that is capable of giving you the minimum value among a list of items in constant time. Yes, constant time. It supports adding elements in log time and it can only remove the top element. It also does not support searching. A famous problem that is solved by heaps is the heavy hitters problem(Top K Frequent Words). It's not a very versatile data structure though a lot of problems can be solved using heaps. &lt;/p&gt;

&lt;p&gt;A follow-up to heap problems would be to remove the heap and use an optimized data structure or algorithms. Still using heaps would be a good first approach. &lt;/p&gt;

&lt;p&gt;A surprising property of heaps is that adding n elements to a heap is linear time and not nlogn time as you might expect. Here's a link to a &lt;a href="https://www.cs.umd.edu/~meesh/351/mount/lectures/lect14-heapsort-analysis-part.pdf"&gt;lecture&lt;/a&gt; that proves it. &lt;/p&gt;

&lt;p&gt;It's important to be familiar with how to use the in-built heap data structure in your programming language. I suggest you solve the problems below with the in-built data structure instead of implementing your own heap.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/relative-ranks/"&gt;Relative ranks&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/last-stone-weight/"&gt;Last stone weights&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/top-k-frequent-words/"&gt;Top K Frequent Words&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/sort-characters-by-frequency/"&gt;Sort characters by Frequency&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tree&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Tree problems are the first time you would be exposed to recursive problems(if you don't solve Linked List problems recursively). They are good interview problems. Solutions involving trees require you to understand pointers/references in your programming language. Don't worry if you are having a tough time with the easy problems, it's normal. Go slow but make sure to understand the solution and be fluent in coding up the different tree traversal techniques. A good way to understand is to trace out the recursive solution. &lt;/p&gt;

&lt;p&gt;By the end, you should be comfortable with recursion or at least not feel intimidated when you have to solve a problem recursively.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-tree-inorder-traversal/"&gt;Inorder traversal of Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-tree-postorder-traversal/"&gt;Postorder traversal of Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-tree-preorder-traversal/"&gt;Preorder traversal of Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-tree-level-order-traversal/"&gt;Binary tree level order traversal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/invert-binary-tree/"&gt;Invert binary tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/maximum-depth-of-binary-tree/"&gt;Maximum Depth of Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/diameter-of-binary-tree/"&gt;Diameter of Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/"&gt;Lowest Common Ancestor of a Binary Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most problems for trees can be solved with one of the traversal techniques so it's extremely important to know them. Be wary of null pointer exceptions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Binary Search Tree&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Binary Search Tree(BST) is a special form of trees where if you perform an inorder traversal of the tree you would get the elements of the tree in sorted order. This is achieved by ensuring all the elements to the left of the current node is less than the current node and all the elements to the right of the current node is greater than the current node. &lt;/p&gt;

&lt;p&gt;Fluency in pointer/reference traversal along with recursion is required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/search-in-a-binary-search-tree/"&gt;Search in a BST&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/binary-search-tree-iterator/"&gt;BST Iterator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/delete-node-in-a-bst/"&gt;Delete Node in BST&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/"&gt;Convert Sorted Array to Binary Search&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/validate-binary-search-tree/"&gt;Validate Binary Search Tree&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;BSTs support log(n) operation in best case and in certain cases it will give linear time operations(you should know those cases). Hence, there are advanced data structures such as red black trees that impose additional constraints to ensure all operations on BSTs are log(n). You are not required to know the implementation of red-black trees but you should be familiar with any in-built data structure that uses red-black trees(such as Java's TreeMap/TreeSet)&lt;/p&gt;

&lt;h3&gt;
  
  
  Graph&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;In my experience graphs are the most frequently asked topics in companies. These problems requires applications of different data structures such as Hash Maps, Lists, and Set. At this point you should be fluent in recursion. &lt;/p&gt;

&lt;p&gt;You should be familiar with the different graph representations, their advantages and disadvantages. You should know the different traversals for graphs(Breadth first search and Depth First search) and their use-cases&lt;/p&gt;

&lt;p&gt;Some problems will require you to identify that it's a graph problem and straight up apply a graph traversal algorithm whereas others require you to construct a graph before traversing it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/find-if-path-exists-in-graph/"&gt;Find if Path Exists in Graph&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/number-of-islands/"&gt;Number of Islands&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/rotting-oranges/"&gt;Rotting oranges&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/01-matrix/"&gt;0-1 Matrix&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/course-schedule/"&gt;Course schedule&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/network-delay-time/"&gt;Network delay time&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://leetcode.com/problems/find-all-possible-recipes-from-given-supplies/"&gt;Find all possible recipes from given supplies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For interview prep, a lot of your focus should be identifying and mastering graph problems. Being able to solve graph problems will act as a spring board for being able to solve dynamic programming problems.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to use Leetcode effectively</title>
      <dc:creator>DFS With Memo</dc:creator>
      <pubDate>Sun, 21 Aug 2022 15:49:29 +0000</pubDate>
      <link>https://forem.com/dfs_with_memo/how-to-use-leetcode-effectively-2lgf</link>
      <guid>https://forem.com/dfs_with_memo/how-to-use-leetcode-effectively-2lgf</guid>
      <description>&lt;p&gt;Ah fall semester, the season for internships/full time new grad roles. So if like me, you are preparing for interviews for big tech companies, I am sure you have come across &lt;a href="https://leetcode.com"&gt;Leetcode&lt;/a&gt;. If not, I highly recommend switching your preparation from other platforms to Leetcode(and sticking with it). Leetcode has a large collection of questions, great community written solutions to problems and an awesome discuss section.&lt;/p&gt;

&lt;p&gt;If you are just starting out consider checking out my &lt;a href="https://dev.to/dfs_with_memo/leetcode-survival-guide-1cp3"&gt;Leetcode Survival guide&lt;/a&gt; so that you don't waste your time solving random Leetcode problems or buy expensive courses to learn data structures and algorithms.&lt;/p&gt;

&lt;p&gt;In this post, I will write about how to use the different features available on Leetcode for interview preparation. Be its your first time interviewing or you are a seasoned interviewer, I am sure you may not have come across all these features or you are not using them.&lt;/p&gt;

&lt;p&gt;The post will contain two sections, one aimed at all users and another section for those who have purchased Leetcode Premium(LC Premium). You can refer to the table of contents to jump to any section&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
For everyone

&lt;ul&gt;
&lt;li&gt;Discuss section for solutions&lt;/li&gt;
&lt;li&gt;Discuss section for interview experiences&lt;/li&gt;
&lt;li&gt;Daily leetcode problem&lt;/li&gt;
&lt;li&gt;Input size&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
Premium users

&lt;ul&gt;
&lt;li&gt;
Problem with sorting by frequency

&lt;ul&gt;
&lt;li&gt;Filtering by topic and company tag&lt;/li&gt;
&lt;li&gt;Company specific list&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For everyone &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Don't ignore the discuss section for solutions &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Once you submit your solution, Leetcode shows how your solution's run time compares with all the previously submitted solutions. Now, the runtime of your code is very much dependent on how loaded the servers running your code are. So it may not always be accurate. To get an estimate of your actual performance, you might have to run your code several times. &lt;/p&gt;

&lt;p&gt;If on your first try you get a solution that is just 5% faster than all the solutions, don't expect to get better than 20% faster than all solutions at best. At this point, I suggest you check out the discuss tab for the problem. You might have written a non-standard solution or you might have to tweak some part of your code. &lt;/p&gt;

&lt;p&gt;For example - you might be mutating strings in Java without using the StringBuilder class, you are passing many parameters into a recursive function call, you are using a heap when in reality a queue would have sufficed and many other factors. So head out to the discuss section and you will find concise(and more performant) ways to write the solution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;If your solution beats most of the solution, I encourage you to write a post which will help others on their way. Typing up an explanation will help as well. Make sure you use an appropriate heading and provide the correct tags.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't ignore the discuss section for interview experiences&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Regardless of whether you are a premium or free user, you should check out interview experiences by other users. Why? Two main reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It will help you anticipate the format of your interview(OA, phone screen, on-site, HR/team matching rounds, compensation)&lt;/li&gt;
&lt;li&gt;You might stumble upon a question that is not even present on Leetcode.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Not every post would be well detailed. I would suggest going through multiple pages in the search result and collecting high quality interview experiences and storing them in an excel sheet. I personally use &lt;a href="https://notion.so"&gt;Notion&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't ignore the daily Leetcode problem&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;The daily Leetcode problem is a great way for newcomers to experience different types of problems. Even if you don't solve the problem entirely on your own, I would suggest reading the problem, thinking of an approach and if you can't come up with one, check out the discuss section. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I would advise not developing this urge to solve each and every daily problem. If you feel overwhelmed by the problem/solution be focused on your interview prep. There's no harm if you are unable to solve the problem because it's too difficult. If the problem is good and you want o visit it later, you can add it in an excel sheet or have your &lt;a href="https://support.leetcode.com/hc/en-us/articles/360013577094-How-to-use-My-List"&gt;Custom list&lt;/a&gt; on Leetcode.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't ignore the input size&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;When you read a problem, the input constraints are always mentioned at the bottom. Make it a habit to read it for every question and it's a good practice to clarify with your interviewer. &lt;/p&gt;

&lt;p&gt;Why? Because the input constraints is directly correlated with the time complexity of an accepted solution. There has been many a time when I have thought of a solution that would work but I didn't code it up and try because I thought my solution would give time limit exceeded(TLE). I would then go to the discuss section or watch a video and it would feel frustrating when I see the same solution.&lt;/p&gt;

&lt;p&gt;Here's a table that maps the time complexity with input sizes&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Input size&lt;/th&gt;
&lt;th&gt;Time complexity&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&amp;gt;= 10^5&lt;/td&gt;
&lt;td&gt;


&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;O(n)/O(nlogn)O(n) / O(nlogn) &lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;span class="mord"&gt;/&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="mord mathnormal"&gt;l&lt;/span&gt;&lt;span class="mord mathnormal"&gt;o&lt;/span&gt;&lt;span class="mord mathnormal"&gt;g&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1000-5000&lt;/td&gt;
&lt;td&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;O(n2)O(n^2) &lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100-500&lt;/td&gt;
&lt;td&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;O(n3)O(n^3) &lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mtight"&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0-32&lt;/td&gt;
&lt;td&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;O(2n)O(2^n) &lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord"&gt;&lt;span class="mord"&gt;2&lt;/span&gt;&lt;span class="msupsub"&gt;&lt;span class="vlist-t"&gt;&lt;span class="vlist-r"&gt;&lt;span class="vlist"&gt;&lt;span&gt;&lt;span class="pstrut"&gt;&lt;/span&gt;&lt;span class="sizing reset-size6 size3 mtight"&gt;&lt;span class="mord mathnormal mtight"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="mclose"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0-15&lt;/td&gt;
&lt;td&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;O(n!)O(n!) &lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord mathnormal"&gt;O&lt;/span&gt;&lt;span class="mopen"&gt;(&lt;/span&gt;&lt;span class="mord mathnormal"&gt;n&lt;/span&gt;&lt;span class="mclose"&gt;!)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Generally speaking, the above relationship is applicable to common platforms such as Hackerrank.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You can use the input constraints to come up with an algorithm. For example: if you see a problem with the constrains 0-32 consider applying bitmasking dynamic programming&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Leetcode Premium users&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;I advocate purchasing the Leetcode premium subscription for a year. It makes life easier. Sure you can access the premium problems on other websites and dig up previously asked questions for a company from a variety of forums and sources but LC Premium just hand waves all these issues. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I don't recommend buying LC Premium as you are starting out. There are already a lot of high quality problems that are available or free and are asked in a lot of companies. Once you have finished 150-200 problems and you have interviews lined up in the coming weeks, I would recommend you to buy LC Premium&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The problem with sorting by frequency&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;One of the best features of LC premium is being able to sort problems by their "Frequency". But it's a double edged knife. &lt;br&gt;
The frequency that you see on the all-problems list, is actually not the number of times the problem has been asked in the past 0-6 months, 0-1 year or even 1-2 years in the past. Leetcode has their own algorithm to calculating their frequency. &lt;/p&gt;

&lt;p&gt;Here's a &lt;a href="https://leetcode.com/discuss/feedback/1912580/answered-leetcodes-lists-and-frequency-counting-feature-seems-broken"&gt;post&lt;/a&gt; (credits to a friend of mine for the link) in the discuss section about it.&lt;/p&gt;

&lt;p&gt;I personally don't agree with Leetcode's logic on this. I believe that the best way to prepare is to solve the most recent frequently asked questions(in terms of count).&lt;/p&gt;

&lt;p&gt;There are two ways in which you can go about doing this.&lt;/p&gt;

&lt;h4&gt;
  
  
  Filtering by topic and company tag&lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;You will need an excel sheet for this. Navigate to the &lt;a href="https://leetcode.com/problemset/all/"&gt;all problems page&lt;/a&gt;. Chose the topic for which you want to know the most frequently asked questions, say DFS and then chose the company. Click on the frequency column to sort by "most frequently asked problem". Now, here comes the tough part.&lt;/p&gt;

&lt;p&gt;Click on the problem to open the problem in a new window. Scroll down to the end and there will be a companies tab, expand it and you will see the frequency count. Refer to the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--274wrzvG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xymzz3ocyspms7oglxs0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--274wrzvG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xymzz3ocyspms7oglxs0.png" alt="Expand the dropdown" width="486" height="40"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where you will find the actual count. Copy the problem link and note the frequency. When you are preparing for an interview solve by the highest to lowest count. I would advise clicking on each and every problem in the first page and pulling out the frequency count into a separate sheet.  &lt;/p&gt;

&lt;h4&gt;
  
  
  The company specific problems list&lt;a&gt;&lt;/a&gt;
&lt;/h4&gt;

&lt;p&gt;I find that this is approach to be slightly more reliable but it's difficult to prepare topic-wise. &lt;/p&gt;

&lt;p&gt;Navigate to the &lt;a href="https://leetcode.com/problemset/all/"&gt;all problems page&lt;/a&gt; and check the bottom right side right below the calendar. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oE3RjHYz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xlqpw2f7coq6v7hgkrw3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oE3RjHYz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xlqpw2f7coq6v7hgkrw3.png" alt="Company specific tag" width="270" height="651"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is an option to search for a company. Search for the company you want and click on it. You will be directed to a view that looks like the screenshot below.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pro tip- you can quickly navigate to this view if you type &lt;br&gt;
&lt;a href="https://leetcode.com/company/google/"&gt;https://leetcode.com/company/google/&lt;/a&gt; you will be navigated to the problems asked at Google&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I would recommend first solving the problems in the range 0-6 months by their actual frequency count using the method described above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I have followed these steps to improve my chances of clearing interviews and I hope you have learnt something new today.&lt;/p&gt;

&lt;p&gt;I appreciate any comments, thoughts and feedback on the article.&lt;/p&gt;

&lt;p&gt;Till next time, I wish you good luck on your prep.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>career</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Leetcode survival guide</title>
      <dc:creator>DFS With Memo</dc:creator>
      <pubDate>Thu, 18 Aug 2022 16:55:00 +0000</pubDate>
      <link>https://forem.com/dfs_with_memo/leetcode-survival-guide-1cp3</link>
      <guid>https://forem.com/dfs_with_memo/leetcode-survival-guide-1cp3</guid>
      <description>&lt;p&gt;This week I have crossed 500 Leetcode problems. In celebration of that I wanted to write a post reflecting how I survived through 500 Leetcode problems which include some of the most mind bending data structures (union find) and algorithms (topological sort, kadane's algorithm and more)&lt;/p&gt;

&lt;p&gt;If you have stumbled upon this article you might have started your Leetcode journey or considering to solve problems on Leetcode to prepare for interviews for big tech companies. In this post, I will cover some FAQs, Dos and Don'ts and lists of problems that you can solve to become better at problem solving and crack interviews at big tech companies for software engineering and machine learning roles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
Guide

&lt;ul&gt;
&lt;li&gt;Guide&lt;/li&gt;
&lt;li&gt;Things I did well&lt;/li&gt;
&lt;li&gt;Things that I didn't do well&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
FAQ

&lt;ul&gt;
&lt;li&gt;Starting from scratch&lt;/li&gt;
&lt;li&gt;Unable to solve problems on my own&lt;/li&gt;
&lt;li&gt;How many problems should I solve to get good?&lt;/li&gt;
&lt;li&gt;LC Premium&lt;/li&gt;
&lt;li&gt;Drawing tablet for notes&lt;/li&gt;
&lt;li&gt;Programming language for Leetcode&lt;/li&gt;
&lt;li&gt;Knowing a programming language in-depth&lt;/li&gt;
&lt;li&gt;Stuck for hours trying to come up with a solution&lt;/li&gt;
&lt;li&gt;Space complexity&lt;/li&gt;
&lt;li&gt;If I had one week to prepare for interviews&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Dos and Donts&lt;/li&gt;
&lt;li&gt;
Resources

&lt;ul&gt;
&lt;li&gt;Solve&lt;/li&gt;
&lt;li&gt;Learn&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Guide&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Most people confuse simplicity with the absence of stuff. Simplicity is the absence of all unwanted stuff, its the removal of all complications and it has a focus on the most important detail. Here, I present to you a simple guide to help you prepare for your big tech interviews.&lt;/p&gt;

&lt;p&gt;However, focusing on simplicity will make you lose on the behind the scenes stuff, the motivation, how it was achieved, what mistakes were made, what were the leanings etc, so even though my guide is "simple", you should read on to figure out why the guide is as it is.&lt;/p&gt;

&lt;p&gt;The guide I have written below, is for people who are at least familiar with a programming language and know their basic data structures(arrays, linked lists, stacks, trees, graphs etc).&lt;/p&gt;

&lt;p&gt;If you are a complete beginner or unsure, this is for you&lt;/p&gt;

&lt;h3&gt;
  
  
  Guide&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;First of all, I would settle on a List of problems and start solving on Leetcode. &lt;/p&gt;

&lt;p&gt;I would focus on solving problems only from Leetcode, ignoring any other platforms(Competitive Programming sites such as codeforces, spoj, google code jam etc). &lt;/p&gt;

&lt;p&gt;My aim is to clear online assesments/interviews not win competitive programming contests. Though competitive programming is a valid route, it's not the focus of this guide. The preparation, I feel is completely different.&lt;/p&gt;

&lt;p&gt;Since &lt;a href="https://neetcode.io"&gt;Neetcode 150&lt;/a&gt; is my favorite list, I would go with that section by section. In my first pass of the list&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I would focus on the easy and medium problems, moving from top to bottom. &lt;/li&gt;
&lt;li&gt;Skip backtracking, 1-D and 2-D DP sections and move to graphs. &lt;/li&gt;
&lt;li&gt;Once I solve all the easy and medium problems in graphs(both sections), I would visit the DP sections and backtracking.&lt;/li&gt;
&lt;li&gt;If I am preparing for a Google interview, I won't skip the math section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;EDIT: Neetcode has moved graphs over DP so now there is no need to skip any section and you can do the list in order&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once that's done the next step is situation based. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If there is an interview coming up, I would focus on solving company tagged recent frequently asked problems. &lt;/li&gt;
&lt;li&gt;If I have time on my hands, I would pick up another list and solve the problems from there.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's about it really. Have faith in yourself to become better with regular practice and you will surely succeed.&lt;/p&gt;

&lt;p&gt;Below, I have few sections introspecting what I did well in the past couple of months, what I didn't(so you can avoid the pitfalls), FAQs and obligatory learning resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Things I did well&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Consistent practice.
&lt;/h4&gt;

&lt;p&gt;You need to solve around a hundred high quality problems to have a chance of solving new problems. When you are starting out, a single problem can take easily between 2-3 hours of your time even if you managed to come up with a solution of your own. It's crucial to solve consistently so that the numbers rack up. If you solve a single problem every day of the month you would end up solving 30/31 problems.&lt;/p&gt;

&lt;h4&gt;
  
  
  Solving previously asked company specific problems
&lt;/h4&gt;

&lt;p&gt;When I had to prepare for a big tech interview, I dug up questions from forum posts on Leetcode and geeksforgeeks which were asked by that specific company. In my opinion, apart from knowing the common algorithms, patterns, and data structures, it is crucial that you solve previously asked problems by the company you are going to interview at.&lt;/p&gt;

&lt;h4&gt;
  
  
  Keeping track of the problems I solved.
&lt;/h4&gt;

&lt;p&gt;Many use an excel sheet to track the problems they have solved, I personally use &lt;a href="https://notion.so"&gt;Notion&lt;/a&gt;. This helps me revisit problems that I had problems with or quickly look up a one line hint to solve the problem. &lt;/p&gt;

&lt;p&gt;In case I had to look up the solution to a problem, I would try to explain the solution concisely in my own words.&lt;/p&gt;

&lt;h3&gt;
  
  
  Things that I didn't do well&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Solving problems randomly
&lt;/h4&gt;

&lt;p&gt;Originally, I started by filtering problems by topic and solving 5-10 problems from each section. In that time frame, I got an opportunity to interview at Amazon for a SDE-2 role. I was completely lost to say the least. I wasn't improving and I was sure that I won't be able to clear the online assessment.&lt;/p&gt;

&lt;p&gt;I stumbled upon the list of problems mentioned in cracking the coding interview on Leetcode. I felt as if my problem solving abilities changed overnight. I was able to apply the patterns I learn in one problem in the next or at least consider different patterns to solve a single problem. &lt;/p&gt;

&lt;p&gt;In the end, I was unable to clear the online assessment. I didn't solve enough high quality problems. It was a learning experience on itself nonetheless. From then on, my preparation mostly involved solving from popular Lists&lt;/p&gt;

&lt;h4&gt;
  
  
  Not starting immediately
&lt;/h4&gt;

&lt;p&gt;I wasted one semester solving problems from platforms such as hackerrank, codesignal etc. To be honest, I didn't get anywhere. I also believed that I would be able to clear an interview in a big tech company without solving Leetcode. I still ended up in a decent company but it wasn't my first option. &lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I don't have a CS background and so I am unfamiliar with even basic data structures and algorithms. I don't know how to do. How do I prepare so that I can solve Leetcode problems?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It can be pretty overwhelming if you are a new beginner. I would advise you to take it slow.&lt;/p&gt;

&lt;p&gt;First off, learn python. You will only need to know the utmost basic stuff, nothing fancy. You won't need a book, an online tutorial should suffice. To solve Leetcode style problems, I would say understanding data types is one of the topics folks easily ignore. Understand intuitively data types and how they can be combined. &lt;/p&gt;

&lt;p&gt;Next you have to learn and understand data structures/algorithms/complexity analysis. Pick out something from the Learning List and from Problems list. Learn a topic and try to solve a problem from that topic. This is where you have to mentally brace yourself like stepping into a cold shower, it will be a shock. You won't be able to solve even an "easy" problem. &lt;/p&gt;

&lt;p&gt;Play around with the problem a bit by applying the concept you know. It's perfectly fine if you are unable to come up with the right solution because there might be something in there that you haven't learnt yet. Now's the opportunity to learn and add it to your belt. If needed write/type out some notes to reinforce your learning. Move to the next problem. Over time you will surely get better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I have solved 50 problems on Leetcode and yet I am unable to come up with answers of my own, am I doing something wrong?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not quite, 50 problems are too few to get a feel for all the different types of problems that can be asked during an interview. To get good in solving problems, you need consistent and deliberate practice. Pick a topic say array and solve high quality problems. &lt;/p&gt;

&lt;p&gt;High quality problems are those that have been frequently asked by companies in the past/those that have good likes to dislike ratio. To make it easier to find high quality problems, follow a high quality list(see below)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many problems should I solve to get good?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It depends on your comfort level but if this is the first time you are solving these type of problems, I would say about 100-150 problems (5-10 problems from the popular topics). Once you hit that target, solve company tagged questions. &lt;/p&gt;

&lt;p&gt;In my book, to be best prepared for interviews, you need to solve the recently most asked problems for the company you interview with. For that you will require Leetcode Premium(abbreviated as LC Premium).&lt;/p&gt;

&lt;p&gt;If you don't have LC Premium, you can scour the discuss section to find questions asked in interviews of a specific company. That's how I prepared for an interview and it worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is LC Premium worth it?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am not sponsored by Leetcode, it's my personal opinion that it's worth it. The main feature is that you get to know how frequently a question has been asked in a company in the past 0-6 months which I believe is critical to preparing. &lt;/p&gt;

&lt;p&gt;You don't need LC Premium when you are starting out but considering getting it as your interviews draw near and you have exhausted your problems to solve. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which is the best drawing tablet for Leetcode?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have seen this question pop up more times that I would like. My personal opinion is that you don't need a  drawing/writing tablet. I cannot think when staring at a screen so I write stuff down on pen and paper. It's a more traditional way but I can't recommend anything better.&lt;/p&gt;

&lt;p&gt;Notebooks can be expensive. If you are a college student, your department might have a stationary room. If you want to buy a notebook, search for Filler paper.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which programming language should I use?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are a college student, I would advise Python. It's one of the most popular languages. Because of how concise the language is, it's easy to write complicated logic with very less code. If you are an experienced professional, I would say try solving a couple of problems in the language you use daily. If it doesn't work out consider switching to Python. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to know the programming language in-depth?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;No. You have to be familiar with the data structures that are available in the language of your choice. Here's a list&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lists/Dynamic arrays&lt;/li&gt;
&lt;li&gt;Stacks&lt;/li&gt;
&lt;li&gt;Queues&lt;/li&gt;
&lt;li&gt;HashMaps/Dictionary&lt;/li&gt;
&lt;li&gt;Sets&lt;/li&gt;
&lt;li&gt;Heaps&lt;/li&gt;
&lt;li&gt;A data structure that can maintain sorted order and you make queries such as check if a value less than x exist, check if a value greater than x exists. In Python you can use bisect_left and bisect_right, in Java there is TreeMap/TreeSets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;I spent hours stuck on a problem and I am unable to come up with a solution. What should I do to get better?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The discuss section for a problem is a gold mine. Most problems have detailed explanations for the problem. You should spend around 15 minutes trying to figure out an approach for the problem. If you find a high level approach, such as you figure out that you need to apply binary search, take another 15 minutes to hash out the algorithm. If you are able to do so, code it up. If not look at the solution. Don't spend more than half an hour playing with the problem.&lt;/p&gt;

&lt;p&gt;I would also advise against getting frustrated. I know it's a difficult thing but be patient. Work your brain but not too much as there is a lot of problems and patterns to know and spending your precious time on a single problem is not worth it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I focus on space complexity?&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Not unless there is a follow up question. I personally try to optimize for space because saving space is directly related to practical real world performance. There is a huge cost for allocating memory on a heap which if possible should be avoided.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I have a week to prepare for interviews and I don't know which topic to focus on.&lt;/strong&gt;&lt;a&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are interviewing for a big tech company and you only have a week to prepare, I would suggest solving the graph problems from the &lt;a href="https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions"&gt;Blind75 list&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;A common reaction would be to solve dynamic programming(DP) questions but in recent times, I have seen that graphs are more popular. If you have some advanced knowledge or over time you accumulate problem solving experience, you will come to realize that DP is at its core a DFS with caching. &lt;/p&gt;

&lt;p&gt;If you have time remaining focus on array problems that involve searching, sorting, modifying an array&lt;/p&gt;

&lt;h2&gt;
  
  
  Dos and Don'ts&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;If you are stuck you might be tempted to pass the code through a debugger.I would highly discourage that.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead, go through your code step by step without a debugger. If you need to write stuff down, that's okay. If the input size is too large, think of ways you can reproduce the issue on a smaller data set. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Take enough breaks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Leetcode burnout is real. Consistent practice is better than burst practice. Even if you can't dedicate 4-5 hours every day on Leetcode, dedicate one hour every day. If it's not possible to solve every day that's okay, start with 2-3 days a week(maybe weekends) and free up time on weekdays. Try to make solving Leetcode problems the first thing you do in the day, not the last.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't ignore the discuss section&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Leetcode's run time is very erratic but if your solution is consistently slower than 20% of all solutions, its time to see the answers in the discuss section. Most likely, someone has done it in a better way. Minor optimizations/tweaks can also go a long way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resources&lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Solve&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;My personal recommendation,&lt;a href="https://neetcode.io"&gt;Neetcode's 150 problem list&lt;/a&gt;&lt;br&gt;
You can also aim for the 75 problems list on the same website. &lt;strong&gt;I would recommend solving the graph problems first before going to the dynamic programming section&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sean Prasad's leetcode patterns list, you can filter by company &lt;a href="https://seanprashad.com/leetcode-patterns/"&gt;Sean Prasad's Leetcode patterns&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another popular list &lt;a href="https://gist.github.com/tykurtz/3548a31f673588c05c89f9ca42067bc4"&gt;Grokking the coding interview problems&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There's an &lt;a href="https://www.educative.io/courses/grokking-the-coding-interview"&gt;Online course&lt;/a&gt; for Grokking the coding interview&lt;/p&gt;

&lt;p&gt;The OG list for problem solving &lt;a href="https://leetcode.com/discuss/general-discussion/1152824/cracking-the-coding-interview-6th-edition-in-leetcode"&gt;Cracking the coding interview 6th edition Leetcode problems&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you need additional practice - &lt;a href="https://www.geeksforgeeks.org/dsa-sheet-by-love-babbar/"&gt;Love Babbar's 450 problems DSA list&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Learn DSA&lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;For all the knowledge you need on data structures, William Fiset's data structure course - &lt;a href="https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu"&gt;https://www.youtube.com/playlist?list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&lt;/a&gt; (I would recommend watching till video number 37)&lt;/p&gt;

&lt;p&gt;For most of the common algorithms, Algorithms playlist course by Abdul Bari -&lt;br&gt;
&lt;a href="https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O"&gt;https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O&lt;/a&gt; (I would recommend watching the first 26 videos to learn about complexity analysis)&lt;/p&gt;

&lt;p&gt;For all the graph algorithms you would require for interviews , Graph playlists by William Fiset - &lt;a href="https://www.youtube.com/playlist?list=PLDV1Zeh2NRsDGO4--qE8yH72HFL1Km93P"&gt;https://www.youtube.com/playlist?list=PLDV1Zeh2NRsDGO4--qE8yH72HFL1Km93P&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The tech interview handbook which contains a comprehensive list of topics and problems to practice - &lt;a href="https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/"&gt;https://www.techinterviewhandbook.org/algorithms/study-cheatsheet/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>interview</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
