<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Path: Data Structures on Tech Interview Prep</title>
    <link>https://pankajpipada.com/tech-interview-prep/data-structures/</link>
    <description>Recent content in Path: Data Structures on Tech Interview Prep</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <copyright>Copyright © 2016-Present Pankaj Pipada. All Rights Reserved.</copyright>
    <atom:link href="https://pankajpipada.com/tech-interview-prep/data-structures/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Quick Notes</title>
      <link>https://pankajpipada.com/tech-interview-prep/data-structures/quick-notes/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://pankajpipada.com/tech-interview-prep/data-structures/quick-notes/</guid>
      <description>&lt;h1 id=&#34;data-structures-quick-notes&#34;&gt;Data Structures: Quick Notes&lt;a class=&#34;anchor&#34; href=&#34;#data-structures-quick-notes&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;h2 id=&#34;complexity-summary-typical&#34;&gt;Complexity summary (typical)&lt;a class=&#34;anchor&#34; href=&#34;#complexity-summary-typical&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;blockquote class=&#39;book-hint &#39;&gt;&#xA;&lt;p&gt;Many structures have good &lt;strong&gt;average&lt;/strong&gt; performance but bad &lt;strong&gt;worst-case&lt;/strong&gt;. Interviews often want both.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Data Structure&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: right&#34;&gt;Access&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: right&#34;&gt;Search&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: right&#34;&gt;Insert&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: right&#34;&gt;Delete&lt;/th&gt;&#xA;          &lt;th style=&#34;text-align: right&#34;&gt;Space&lt;/th&gt;&#xA;          &lt;th&gt;Notes&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Array&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;insert/delete in middle shifts&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Dynamic Array (vector/list)&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;amort. &lt;code&gt;O(1)&lt;/code&gt; append&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;occasional resize&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Stack&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;top &lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;LIFO&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Queue / Deque&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;front/back &lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;FIFO / double-ended&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Singly Linked List&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;*&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;*&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;*if pointer to node/prev is known&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Doubly Linked List&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;*&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(1)&lt;/code&gt;*&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;easy delete given node&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Hash Table / Hash Map&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;N/A&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;avg &lt;code&gt;O(1)&lt;/code&gt;, worst &lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;avg &lt;code&gt;O(1)&lt;/code&gt;, worst &lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;avg &lt;code&gt;O(1)&lt;/code&gt;, worst &lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;depends on hashing + resizing&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;BST (unbalanced)&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;can degrade to linked list&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;AVL / Red-Black Tree&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;guaranteed height &lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;B-Tree / B+Tree&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;great for disks/DBs&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Binary Heap&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;peek &lt;code&gt;O(1)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;priority queue&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Trie&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(L)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(L)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(L)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(L)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;large&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;L&lt;/code&gt; = key length&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Fenwick Tree (BIT)&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;N/A&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;range sum &lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;update &lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;N/A&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;prefix sums&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Segment Tree&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;N/A&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;query &lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;update &lt;code&gt;O(log n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;N/A&lt;/td&gt;&#xA;          &lt;td style=&#34;text-align: right&#34;&gt;&lt;code&gt;O(n)&lt;/code&gt;&lt;/td&gt;&#xA;          &lt;td&gt;flexible aggregates&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;linked-list&#34;&gt;Linked List&lt;a class=&#34;anchor&#34; href=&#34;#linked-list&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Linear collection of nodes; each node points to next (and possibly prev).&lt;/li&gt;&#xA;&lt;li&gt;Good for:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;frequent inserts/deletes when you already have a node reference,&lt;/li&gt;&#xA;&lt;li&gt;building other structures (LRU list).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Bad for:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;random access,&lt;/li&gt;&#xA;&lt;li&gt;cache locality.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Variants:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Problems</title>
      <link>https://pankajpipada.com/tech-interview-prep/data-structures/problems/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>https://pankajpipada.com/tech-interview-prep/data-structures/problems/</guid>
      <description>&lt;h1 id=&#34;data-structures-problems&#34;&gt;Data Structures: Problems&lt;a class=&#34;anchor&#34; href=&#34;#data-structures-problems&#34;&gt;#&lt;/a&gt;&lt;/h1&gt;&#xA;&lt;p&gt;Pick a data structure and drill problems tagged with it.&lt;/p&gt;&#xA;&#xA;  &lt;ul&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#array&#34;&gt;Array&lt;/a&gt;&#xA;        (32)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#bits&#34;&gt;Bits&lt;/a&gt;&#xA;        (5)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#graph&#34;&gt;Graph&lt;/a&gt;&#xA;        (7)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#hash-table&#34;&gt;Hash Table&lt;/a&gt;&#xA;        (11)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#heap&#34;&gt;Heap&lt;/a&gt;&#xA;        (3)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#linkedlist&#34;&gt;Linkedlist&lt;/a&gt;&#xA;        (5)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#stack&#34;&gt;Stack&lt;/a&gt;&#xA;        (3)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#string&#34;&gt;String&lt;/a&gt;&#xA;        (18)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#tree&#34;&gt;Tree&lt;/a&gt;&#xA;        (12)&#xA;      &lt;/li&gt;&lt;li&gt;&#xA;        &lt;a href=&#34;#trie&#34;&gt;Trie&lt;/a&gt;&#xA;        (3)&#xA;      &lt;/li&gt;&lt;/ul&gt;&#xA;&#xA;  &lt;h2 id=&#34;array&#34;&gt;Array&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/best-time-to-buy-and-sell-stock/&#34;&gt;Best time to buy and sell stock&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/bigram-model-next-word-prediction/&#34;&gt;Bigram Model - Next Word Prediction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/combination-sum-iv/&#34;&gt;Combination sum IV&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/construct-binary-tree-from-preorder-and-inorder-traversal/&#34;&gt;Construct binary tree from preorder and inorder traversal&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/container-with-most-water/&#34;&gt;Container with most water&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/contains-duplicate/&#34;&gt;Contains duplicate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/count-distinct-subsequences/&#34;&gt;Count Distinct Subsequences&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/counting-bits/&#34;&gt;Counting bits&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/find-minimum-in-rotated-sorted-array/&#34;&gt;Find minimum in rotated sorted array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/house-robber/&#34;&gt;House robber&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/house-robber-ii/&#34;&gt;House robber II&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/insert-interval/&#34;&gt;Insert interval&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/jump-game/&#34;&gt;Jump game&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-consecutive-sequence/&#34;&gt;Longest consecutive sequence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-increasing-subsequence/&#34;&gt;Longest increasing subsequence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/maximum-product-subarray/&#34;&gt;Maximum product subarray&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/maximum-subarray/&#34;&gt;Maximum subarray&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/meeting-rooms/&#34;&gt;Meeting rooms&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/meeting-rooms-ii/&#34;&gt;Meeting rooms II&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/merge-intervals/&#34;&gt;Merge intervals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/missing-number/&#34;&gt;Missing number&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/non-overlapping-intervals/&#34;&gt;Non overlapping intervals&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/product-of-array-except-self/&#34;&gt;Product of array except self&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/rotate-image/&#34;&gt;Rotate image&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/search-in-rotated-sorted-array/&#34;&gt;Search in rotated sorted array&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/set-card-game-validate-find/&#34;&gt;SET Card Game - Validate Set And Find Set&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/set-matrix-zeroes/&#34;&gt;Set matrix zeroes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/spiral-matrix/&#34;&gt;Spiral matrix&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/three-sum/&#34;&gt;Three sum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/two-sum/&#34;&gt;Two sum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/unique-paths/&#34;&gt;Unique paths&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/word-search/&#34;&gt;Word search&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;bits&#34;&gt;Bits&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/counting-bits/&#34;&gt;Counting bits&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/missing-number/&#34;&gt;Missing number&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/number-of-1-bits/&#34;&gt;Number of 1 bits&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/reverse-bits/&#34;&gt;Reverse bits&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/sum-of-two-integers/&#34;&gt;Sum of two integers&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;graph&#34;&gt;Graph&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/alien-dictionary/&#34;&gt;Alien dictionary&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/clone-graph/&#34;&gt;Clone graph&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/course-schedule/&#34;&gt;Course schedule&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/graph-valid-tree/&#34;&gt;Graph valid tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/number-of-connected-components-in-an-undirected-graph/&#34;&gt;Number of connected components in an undirected graph&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/number-of-islands/&#34;&gt;Number of islands&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/pacific-atlantic-water-flow/&#34;&gt;Pacific-Atlantic water flow&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;hash-table&#34;&gt;Hash Table&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/bigram-model-next-word-prediction/&#34;&gt;Bigram Model - Next Word Prediction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/contains-duplicate/&#34;&gt;Contains duplicate&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/group-anagrams/&#34;&gt;Group anagrams&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-substring-without-repeating-characters/&#34;&gt;Longest substring without repeating characters&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/minimum-window-substring/&#34;&gt;Minimum window substring&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/set-card-game-validate-find/&#34;&gt;SET Card Game - Validate Set And Find Set&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/three-sum/&#34;&gt;Three sum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/top-k-frequent-elements/&#34;&gt;Top k frequent elements&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/two-sum/&#34;&gt;Two sum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/valid-anagram/&#34;&gt;Valid anagram&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/verify-lexicographic-sort-custom/&#34;&gt;Verify Lexicographic Sort With Custom Alphabet&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;heap&#34;&gt;Heap&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/find-median-from-data-stream/&#34;&gt;Find median from data stream&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/merge-k-sorted-lists/&#34;&gt;Merge k sorted lists&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/top-k-frequent-elements/&#34;&gt;Top k frequent elements&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;linkedlist&#34;&gt;Linkedlist&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/linked-list-cycle/&#34;&gt;Linked list cycle&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/merge-k-sorted-lists/&#34;&gt;Merge k sorted lists&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/remove-nth-node-from-end-of-list/&#34;&gt;Remove n&amp;#39;th node from end of list&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/reorder-list/&#34;&gt;Reorder list&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/reverse-linked-list/&#34;&gt;Reverse linked list&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;stack&#34;&gt;Stack&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/eval-precedence-expression/&#34;&gt;Evaluate Precedence Expression With &amp;#43; And *&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/make-parentheses-valid/&#34;&gt;Minimum Remove To Make Parentheses Valid&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/valid-parentheses/&#34;&gt;Valid parentheses&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;string&#34;&gt;String&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/bigram-model-next-word-prediction/&#34;&gt;Bigram Model - Next Word Prediction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/count-distinct-subsequences/&#34;&gt;Count Distinct Subsequences&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/decode-ways/&#34;&gt;Decode ways&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/encode-and-decode-strings/&#34;&gt;Encode and decode strings&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/eval-precedence-expression/&#34;&gt;Evaluate Precedence Expression With &amp;#43; And *&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/group-anagrams/&#34;&gt;Group anagrams&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/string-is-subsequence/&#34;&gt;Is Subsequence&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-palindromic-substring/&#34;&gt;Longest palindromic substring&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-repeating-character-replacement/&#34;&gt;Longest repeating character replacement&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/longest-substring-without-repeating-characters/&#34;&gt;Longest substring without repeating characters&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/make-parentheses-valid/&#34;&gt;Minimum Remove To Make Parentheses Valid&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/minimum-window-substring/&#34;&gt;Minimum window substring&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/palindromic-substrings/&#34;&gt;Palindromic substrings&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/valid-anagram/&#34;&gt;Valid anagram&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/valid-palindrome/&#34;&gt;Valid palindrome&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/valid-parentheses/&#34;&gt;Valid parentheses&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/verify-lexicographic-sort-custom/&#34;&gt;Verify Lexicographic Sort With Custom Alphabet&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/word-break/&#34;&gt;Word break&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;tree&#34;&gt;Tree&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/binary-tree-level-order-traversal/&#34;&gt;Binary tree level order traversal&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/binary-tree-maximum-path-sum/&#34;&gt;Binary tree maximum path sum&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/construct-binary-tree-from-preorder-and-inorder-traversal/&#34;&gt;Construct binary tree from preorder and inorder traversal&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/level-order-binary-tree-insert/&#34;&gt;Insert Into Complete Binary Tree (Level-Order)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/invert-binary-tree/&#34;&gt;Invert a binary tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/kth-smallest-element-in-a-bst/&#34;&gt;Kth smallest element in a BST&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/lowest-common-ancestor-of-a-bst/&#34;&gt;Lowest common ancestor of a binary search tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/maximum-depth-of-binary-tree/&#34;&gt;Maximum depth of binary tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/same-tree/&#34;&gt;Same tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/serialize-and-deserialize-binary-tree/&#34;&gt;Serialize and deserialize a binary tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/subtree-of-another-tree/&#34;&gt;Subtree of another tree&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/validate-binary-search-tree/&#34;&gt;Validate a binary search tree&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2 id=&#34;trie&#34;&gt;Trie&lt;/h2&gt;&#xA;&#xA;    &lt;ul&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/add-and-search-word/&#34;&gt;Add and search word - data structure design&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/implement-trie-prefix-tree/&#34;&gt;Implement trie (prefix tree)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&#34;https://pankajpipada.com/tech-interview-prep/problems/word-search-ii/&#34;&gt;Word search II&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;</description>
    </item>
  </channel>
</rss>
