# Software Engineering

### Overview

- Coding
- Algorithm
- Complexity
- Bit Manipulation
- Sting and bit manipulation
- Priority Queue
- Monotonic Stack/Queue
- Two Pointers
- Two Pointer and Monotonic Queue and Greedy
- Slow and fast pointer
- Binary Search
- String problems
- Union find
- Segment Tree
- Rolling hash
- Binary Lifting Algorithm
- Simulated annealing
- Bit manipulation
- Backtracking
- Backtrack and bitmask
- Process simulation
- Discuss by cases
- Count on 1D/2D array
- Power, Binary Exponentiation and Matrix Exponentiation
- Minimum/maximum distance to points
- Game theory
- Stone Games
- submatrix problems
- Mixed algorithms
- BFS and Dijkstra
- BFS/Dijkstra/DP
- DFS and Binary Search
- DFS and pre/post order traversal and two pointer
- 2D range sum and DP and multi-source 0 1 bfs
- Topological sort, cycle finding in directed graph and DFS
- Topological sort and DP
- Backtracking and Math
- Union find and binary search
- Prefix sum and edge cases
- Prefix sum and bit manipulation
- Soft deletion and Monotonic Queue
- DP and binary seach and monotonic queue
- DFS and DP
- Two pointers and linked list
- Two pointers and binary search
- Union Find and two pointer
- Union Find, DFS/BFS
- String problems by using C++
- Limited Space problems

- Arrays
- Stack
- Sparse Table or Stack
- Stack and binary tree
- rectangle area
- Geometric Problems
- Interval Problems
- Word search problems
- Solve the problem backwards or reversely
- Preprocess to speed up the computation
- Data Structure
- Games
- Greedy construction
- Edge cases
- Parentheses problems
- Permutations and combinations
- Prefix sum or prefix frequency sum
- Meet in middle
- Math
- Random topics
- Source Code understanding
- Kernel Programming
- Operating system
- STL source code
- Python tips
- C++ STL
- C++ tips
- Git tips
- Docker
- Imporant times
- Go language
- Top Coders
- Hardwares

## Coding

My ‘Serious’ coding got started since I became a student as a Computer Science Major at the CUNY. Thanks for Dr. Siyu Liao’s help during my earlier programming life. Thanks for Professor Liang Huang to guide me to the Python world. I am actively participate in the Leetcode weekly contest and you can find my profile here.

## Algorithm

## Complexity

- Nice visualization for computation complexity
### Sorting

- Sorting algorithms
- quicksort
- Leetcode 274 H index
- Kth
- merge sort on a linked list

### Graph Algorithm

#### BFS/DFS

- LeetCode 1462 Course Schedule IV
- Leetcode 797. All Paths From Source to Target
- A standard BFS Leetcode 773 Sliding Puzzle
- C++ DFS Leetcode 490. The Maze
- Jump Game IV
- Word Ladder II: BFS
- Using BFS to solve a hard problem

#### Dijkstra algorithm

- Correctness of Dijkstra algorithm
- An interesting problem solved by dijkstra algorithm: LC 882. Reachable Nodes In Subdivided Graph
#### BFS and Dijkstra

- BFS + Dijkstra

#### Dijkstra and Floyd Warshall

### SSSP and DP

#### topological sort

#### Bipartition

#### Cycle find problems

- Cycle find algorithm: Leetcode 1559. Detect Cycles in 2D Grid
- Find the minimum weight cycle in an undirected graph

#### MST

#### SSSP(Single-Source Shortest Paths)

- SSSP on Unweighted Graph
- SSSP on Weighted Graph
- Dijkstra
- Best video to explain dijkstra algorithm
- Build the shortest path spanning tree
- Solve the Second Shortest Path problem
- SSSP on Graph with Negative Weight Cycle
#### APSP(All-Pairs Shortest Paths)

#### Minimum Weight Cycle in an Undirected Graph

#### Some relatively hard graph problems

### Dynamic Programming

#### Summary

#### Classical and its variations

- Longest Increasing subsequence
- Variations of LIS probems
- Mountain Array and LIS
- LIS:1626. Best Team With No Conflicts
- [LIS ACwing] (https://jimmy-shen.medium.com/lis-4de7641509a0)
- Longest common subsequence
- LCS and LIS: LC 1713 Minimum Operations to Make a Subsequence
- Longest Palindromic Subsequence
- Combination sum or Coin Change
- Jump Games
- knapsack problem
- [Knapsack problems ACWing] (https://jimmy-shen.medium.com/knapsack-problem-26634d6a98a8)
- a knapsack problem:leetcode 1621. Number of Sets of K Non-Overlapping Line Segments
- A DP problem solved by using a Knapsack problem way 1639. Number of Ways to Form a Target String Given a Dictionary
- Rod Cutting
- House Robber II

#### Find Recurrence in DP

#### 1D DP

#### 2D DP

#### 3D DP

#### 4D DP

#### Top Down DP and Bottom Up DP

#### States of the DP is the Key

#### DP programs on the grid

### State machine DP

#### Range DP

### DP look backwards

### Digit DP

#### TSP

#### Bitmask DP

- bitmask DP
-LC 1900. The Earliest and Latest Rounds Where Players Compete
#### DP and combinations

- DP related to combination LC 1866. Number of Ways to Rearrange Sticks With K Sticks Visible

## Bit Manipulation

- Bit Manipulation
- LeetCode 342 Power of Four
- LeetCode 137 single number ii
- LeetCode 260 single number iii
- XOR: LC 1734. Decode XORed Permutation
- Using bit manipulation to speed up the computation LC 1178 Number of Valid Words for Each Puzzle

## Sting and bit manipulation

## Priority Queue

## Monotonic Stack/Queue

- Monotonic queue
- Sliding window min/max, priority queue & Monotonic Queue
- 2d sliding window min/max problem
- 713. Subarray Product Less Than K
- Monotonic queue: LC933 Number of Recent Calls
- Monotonic Queue 1696 jump game VI
- LC Largest Rectangle in histogram
- Using monotonic stack to solve some problems
- 1944. Number of Visible People in a Queue

## Two Pointers

- Two Pointer problems
- Two Pointer
- 3sum
- Advanced two pointer problem: LC 1847 Closest room
- Two pointers and sliding window
- Such a nice two pointer problem
- A nice two pointer problem
- A nice two pointer problem LC 151. Reverse Words in a String

## Two Pointer and Monotonic Queue and Greedy

## Slow and fast pointer

## Binary Search

- binary search
- How to set the middle value in a binary search -Why binary search is not working in this problem -A hard binary search problem find median of two sorted array -1760. Minimum Limit of Balls in a Bag -A harder bianry search problem 658. Find K Closest Elements -Two layer binary search

## String problems

## Union find

- Union find
- Leetcode 1562. Find Latest Group of Size M
- Use union find to solve a hard problem: LC:2076. Process Restricted Friend Requests
- Union Find and Prime Factorization 952. Largest Component Size by Common Factor

## Segment Tree

## Rolling hash

## Binary Lifting Algorithm

## Simulated annealing

## Bit manipulation

## Backtracking

- Backtracking 1
- Backtracking 2
- Backtracking 3 40. Combination Sum II
- Using backtrack to solve the Word Search problem
- word search, trie and backtrack
## Backtrack and bitmask

- Backtrack by using bit mask to record visited node

## Process simulation

## Discuss by cases

## Count on 1D/2D array

## Power, Binary Exponentiation and Matrix Exponentiation

- Power, Binary Exponentiation and Matrix Exponentiation -Leetcode 1808. Maximize Number of Nice Divisors

## Minimum/maximum distance to points

## Game theory

## Stone Games

## submatrix problems

-LeetCode 1727. Largest Submatrix With Rearrangements

## Mixed algorithms

### BFS and Dijkstra

### DFS and Binary Search

### DFS and pre/post order traversal and two pointer

### 2D range sum and DP and multi-source 0 1 bfs

### Topological sort, cycle finding in directed graph and DFS

### Topological sort and DP

- Topological sort and DP
- Topological sort and DP 2
### Backtracking and Math

- Backtracking and graph Leetcode 1766. Tree of Coprimes

### Union find and binary search

### Prefix sum and edge cases

### Prefix sum and bit manipulation

### Soft deletion and Monotonic Queue

### DP and binary seach and monotonic queue

### DFS and DP

### Two pointers and linked list

### Two pointers and binary search

- two pointer and binary search
- Two pointer and binary search Leetcode 76 Minimum Window Substring
-Binary search and two pointers: LeetCode 76. Minimum Window Substring
### Union Find and two pointer

- union find and two pointers LC 1697. Checking Existence of Edge Length Limited Paths

### Union Find, DFS/BFS

### String problems by using C++

### Limited Space problems

## Arrays

## Stack

- Using stack to solve the Parentheses problems
- Stack: LeetCode 316 remove duplicate letters
- LC: 1717 maximum score from removing substrings
## Sparse Table or Stack

- Sparse Table or Stack?
- MUSTSEE LC150. Evaluate Reverse Polish Notation

## Stack and binary tree

-stack and binary tree: LC 150 Evaluate Reverse Polish Notation

## rectangle area

- 2D range sum, Kadane’s algorithm and maximum subarray sum no more than k
- Rectangle Areas: Coordinate Compression

## Geometric Problems

- Geometric problems
- Polygon collision
-The intersection of Convex Polygons Algorithm
## Interval Problems

- Interval problems
- LeetCode: 1288. Remove Covered Intervals

## Word search problems

## Solve the problem backwards or reversely

- Solve the problem backwards
- Transform the problem to a more solvable one
- Think the problem reversely -BFS and solve the problem reversely

## Preprocess to speed up the computation

-LC 1761. Minimum Degree of a Connected Trio in a Graph

## Data Structure

### Data Structure Design

- Hash table in python
- A comprehensive one about how to implement a hash table
- Why use a prime number as the hash table size
- LRU and LFU
- Min Stack or Max Stack
- First Unique Number
- 1622. Fancy Sequence

### Heap

### Multiset

### Linked List

- Singly Linked List
- List
- [linked List: Leetcode 24. Swap Nodes in Pairs] (https://jimmy-shen.medium.com/linked-list-1d4f2983e1bc)
- Linked List Problems

### Binary Tree

- Basic binary tree problems
- MUSTSEE super binary tree template problems
- Advanced binary tree problems
- binary tree maximum path sum
- Check If a String Is a Valid Sequence from Root to Leaves Path in a Binary Tree
- BFS and binary tree
- LeetCode 430. Flatten a Multilevel Doubly Linked List
- Catalan number and Unique Binary Search Trees
- LeetCode 449 serialize and deserialize BST
- MUSTSEE LeetCode 426. Convert Binary Search Tree to Sorted Doubly Linked List
- LCA in a tree
- MUSTSEE LeetCode 814 Binary Tree Pruning

### Tree

### Bit manipulation and Tree

### Trie

### Trie and Fast Walsh-Hadamard transform algorithm

### Fenwick Tree or binary index tree

### Red Black Tree

### ODT(Old Driver Tree)

### Soft deletion

## Games

## Greedy construction

## Edge cases

## Parentheses problems

## Permutations and combinations

## Prefix sum or prefix frequency sum

## Meet in middle

## Math

## Random topics

###My Mistakes

### Garbage Collection

## Source Code understanding

### Linux Source Code

## Kernel Programming

## Operating system

### Memory allocation

## STL source code

## Python tips

## C++ STL

## C++ tips

- Customized comparison in C++ part 1
- Customized comparison in C++ part 2
- STL map/unordered_map with a Vector for the Key
- Lambdas in C++ tutorial
- C++ auto
- lambdas in c++
- C++ Tips
- C++ Should curly braces be on their own line or not?
- Computations Modulo P in C++
- set_intersection in C++
- for_each in C++
- C++ sort by tuple or by pair
- C++ sort by word length
- C++ function within a function
- Format C++ code to google coding style
- 0x3f3f3f
- C++ websites and books
- Vector emplace_back struct c++
- Difference between vector and stack in C++
- Have a set of structs
- [Why does priority queue (max heap) in C++ use less
instead of greater ?](https://jimmy-shen.medium.com/why-does-priority-queue-max-heap-in-c-use-less-t-instead-of-greater-t-f1b78c3a04b2) ## Git tips

- Git tips
- git merge VS git rebase

## Docker

- Docker
- How to use Docker
## Imporant times

- Solve a thousand problems

## Go language

### Basic

- Go ‘:=’ vs ‘=’
- Interesting things in Go language
- Goroutines
- Json and Go
- struct tags in GO
- Go tips
- Channels in GO
- Go and OOP
- Golang Packages
- Golang Glog
- Golang Random number generator

### Advanced

- Golang and Pointer
- Map in Golang
- Array, Slice and String in Golang
- How to install gocv on mac
- Slice of struct or slice of pointer to a struct
- Golang nested struct
- Golang and protocol buffer