<?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>DEV Community: Duong Tran Quang</title>
    <description>The latest articles on DEV Community by Duong Tran Quang (@dtducas).</description>
    <link>https://dev.to/dtducas</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%2F3984332%2Faccba6af-554e-45a5-8c69-e4664875965c.jpg</url>
      <title>DEV Community: Duong Tran Quang</title>
      <link>https://dev.to/dtducas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dtducas"/>
    <language>en</language>
    <item>
      <title>I Solved 100+ LeetCode Problems — These Are the Patterns That Actually Matter</title>
      <dc:creator>Duong Tran Quang</dc:creator>
      <pubDate>Sun, 14 Jun 2026 19:36:39 +0000</pubDate>
      <link>https://dev.to/dtducas/i-solved-100-leetcode-problems-these-are-the-patterns-that-actually-matter-455m</link>
      <guid>https://dev.to/dtducas/i-solved-100-leetcode-problems-these-are-the-patterns-that-actually-matter-455m</guid>
      <description>&lt;h1&gt;
  
  
  I Solved 100+ LeetCode Problems — These Are the Patterns That Actually Matter
&lt;/h1&gt;

&lt;p&gt;When I first started solving LeetCode problems, I made the same mistake many beginners make:&lt;/p&gt;

&lt;p&gt;I tried to memorize solutions.&lt;/p&gt;

&lt;p&gt;That approach worked for a few problems, but completely broke down once I encountered new variations.&lt;/p&gt;

&lt;p&gt;After solving more than 100 problems, I realized that most interview questions are not testing specific solutions. They are testing whether you recognize the underlying pattern.&lt;/p&gt;

&lt;p&gt;Instead of asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;How do I solve this problem?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I started asking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Which pattern is this problem testing?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That small shift changed everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Arrays &amp;amp; Hashing
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Two Sum&lt;/li&gt;
&lt;li&gt;Contains Duplicate&lt;/li&gt;
&lt;li&gt;Valid Anagram&lt;/li&gt;
&lt;li&gt;Group Anagrams&lt;/li&gt;
&lt;li&gt;Top K Frequent Elements&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Use hash maps and hash sets to trade memory for speed.&lt;/p&gt;

&lt;p&gt;Typical complexity target:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time: O(n)&lt;/li&gt;
&lt;li&gt;Space: O(n)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Two Pointers
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Valid Palindrome&lt;/li&gt;
&lt;li&gt;Two Sum II&lt;/li&gt;
&lt;li&gt;Container With Most Water&lt;/li&gt;
&lt;li&gt;3Sum&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Move two indices through a sorted structure or from opposite ends of a sequence.&lt;/p&gt;

&lt;p&gt;Typical complexity target:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time: O(n)&lt;/li&gt;
&lt;li&gt;Space: O(1)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Sliding Window
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best Time to Buy and Sell Stock&lt;/li&gt;
&lt;li&gt;Longest Substring Without Repeating Characters&lt;/li&gt;
&lt;li&gt;Minimum Window Substring&lt;/li&gt;
&lt;li&gt;Permutation in String&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Expand and shrink a window while maintaining constraints.&lt;/p&gt;

&lt;p&gt;Typical complexity target:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Time: O(n)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Stack
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Valid Parentheses&lt;/li&gt;
&lt;li&gt;Min Stack&lt;/li&gt;
&lt;li&gt;Daily Temperatures&lt;/li&gt;
&lt;li&gt;Largest Rectangle in Histogram&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Maintain information about previously seen elements.&lt;/p&gt;

&lt;p&gt;Special pattern:&lt;/p&gt;

&lt;p&gt;Monotonic Stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Binary Search
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Binary Search&lt;/li&gt;
&lt;li&gt;Search a 2D Matrix&lt;/li&gt;
&lt;li&gt;Search in Rotated Sorted Array&lt;/li&gt;
&lt;li&gt;Koko Eating Bananas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Search on answer space, not just on arrays.&lt;/p&gt;

&lt;p&gt;This was one of the most important interview patterns for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Trees
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maximum Depth of Binary Tree&lt;/li&gt;
&lt;li&gt;Same Tree&lt;/li&gt;
&lt;li&gt;Balanced Binary Tree&lt;/li&gt;
&lt;li&gt;Validate Binary Search Tree&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Most tree questions become straightforward once you become comfortable with recursive DFS.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Heap / Priority Queue
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kth Largest Element in an Array&lt;/li&gt;
&lt;li&gt;Last Stone Weight&lt;/li&gt;
&lt;li&gt;K Closest Points to Origin&lt;/li&gt;
&lt;li&gt;Find Median from Data Stream&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Efficiently maintain the smallest or largest elements.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Backtracking
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Subsets&lt;/li&gt;
&lt;li&gt;Permutations&lt;/li&gt;
&lt;li&gt;Combination Sum&lt;/li&gt;
&lt;li&gt;N-Queens&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Build a decision tree and explore all possibilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Graphs
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Number of Islands&lt;/li&gt;
&lt;li&gt;Clone Graph&lt;/li&gt;
&lt;li&gt;Course Schedule&lt;/li&gt;
&lt;li&gt;Word Ladder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Most graph problems reduce to DFS, BFS, or Topological Sort.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Dynamic Programming
&lt;/h2&gt;

&lt;p&gt;Common problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Climbing Stairs&lt;/li&gt;
&lt;li&gt;House Robber&lt;/li&gt;
&lt;li&gt;Coin Change&lt;/li&gt;
&lt;li&gt;Longest Increasing Subsequence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Core idea:&lt;/p&gt;

&lt;p&gt;Store solutions to smaller subproblems and reuse them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The biggest improvement in my interview preparation came from organizing problems by pattern rather than by difficulty.&lt;/p&gt;

&lt;p&gt;Once you recognize the pattern, the implementation becomes much easier.&lt;/p&gt;

&lt;p&gt;If you're currently learning LeetCode, focus less on memorizing solutions and more on identifying the recurring techniques behind them.&lt;/p&gt;

&lt;p&gt;What pattern took you the longest to understand?&lt;/p&gt;

&lt;p&gt;I recently organized detailed notes, explanations, and visual walkthroughs for these patterns on my personal site:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dtducas.com/blog" rel="noopener noreferrer"&gt;https://dtducas.com/blog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm continuously adding new problems and explanations as I work through them.&lt;/p&gt;

</description>
      <category>leetcode</category>
      <category>dtducas</category>
      <category>dsa</category>
    </item>
  </channel>
</rss>
