Skip to content

Latest commit

 

History

History
96 lines (64 loc) · 3.58 KB

README-EN.md

File metadata and controls

96 lines (64 loc) · 3.58 KB

Pattern Summary for Algorithm Problems

java Build

My summary of patterns for algorithm questions, based on similarities of techniques we used to solve the problem, with detailed beginner-friendly tutorial of Data Structure and Algorithm.

English version tutorial will be updating regularly, please check my website:

Algorithm Interview Preparation by zdong1995.

Welcome to check my repository LeetCode-Solution-Well-Explained with detailed explanations and comments for LeetCode questions in different categories. If this is helpful for you, please feel free to add a star to the repo. Thank you! ❤️

This repo will be updated as following parts:

  • Part 1: Start from basic Data Structure and Algorithm to get good understanding of Recursion, use Two Pointers technique in large mounts of questions and practice sorting algorithms.

  • Part 2: Search algorithm, especially graph search. BFS, DFS, pruning, memoization, greedy and dynamic programming.

  • Part 3: Popular problems and advanced data structure like Trie, Union Find, TreeSet, TreeMap.

Table of Contents

Popular interview algorithm problems summarized by different patterns.

Fundamental

  • Iterative in LinkedList: Code
  • In-place Iterative in Tree: Code
  • Binary Search

Recursion

  • Introduction to Recursion
  • Recursion in LinkedList
  • Recursion in Tree
  • Recursion to Iterative

Two Pointers

  • Two Sum Pattern: Code
  • Slow-Fast Pointers
  • K-way Merge
  • Deduplication
  • Sliding Window
  • Partition

Sorting

  • Merge Sort
  • Quick Sort
  • Quick Selection
  • Bucket Sort and Count Sort

BFS

  • Level Order Traversal
  • The Shortest Path
  • Connected Component
  • Topology Sorting
  • Best-First Search and Dijkstra

DFS

  • Subset
  • Permutation
  • Parentheses
  • Memoization
  • Graph Search

DP

  • 1D DP
  • 2D DP
  • Greedy

Popular

  • Merge Intervals

  • Two Heap Pattern

  • Top-K Problem

  • Union Find

  • Data Structure Design

  • Bit Operations