Algorithm Notes
Intro
1.
Useful Knowledge
1.1.
Empirical Formulas
1.2.
Modulo Operation
1.3.
Fibonacci
1.4.
Bitset Operations
1.5.
Newton's Method
1.6.
Balanced Binary Search Trees
2.
Problem Solutions
2.1.
Common Problems
2.1.1.
Power of Two
2.1.2.
Common Ancester of Two Nodes in Tree
2.1.3.
Path Sum on Tree
2.1.4.
Sampling Problem
2.1.5.
Knapsack Problem
2.1.6.
Conway's Game of Life
2.1.7.
Weighted Random Distribution
2.1.8.
Max XOR sub sequence
2.1.9.
History Query on Stack
2.1.10.
Partition Problem
2.1.11.
Implement Trie
2.1.12.
Union Find
2.1.13.
Implement Valid Binary Search
2.1.14.
Most Divisors
2.1.15.
Integer Grid Reachable Problems
2.1.16.
Point in Triangle
2.2.
LeetCode
2.2.1.
Invert Binary Tree
2.2.2.
Rectangle Area
2.2.3.
Contains Duplicate
2.2.4.
Reverse Linked List
2.2.5.
Isomorphic Strings
2.2.6.
Count Primes
2.2.7.
Remove Linked List Elements
2.2.8.
Happy Number
2.2.9.
House Robber
2.2.10.
Number of 1 Bits
2.2.11.
Reverse Bits
2.2.12.
Rotate Array
2.2.13.
Factorial Trailing Zeros
2.2.14.
Excel Sheet Column Number/Title
2.2.15.
Majority Element
2.2.16.
Compare Version Numbers
2.2.17.
Intersection of Two Linked List
2.2.18.
Min Stack
2.2.19.
Pascal's Triangle
2.2.20.
Minimum Depth of Binary Tree
2.2.21.
Balanced Binary Tree
2.2.22.
Binary Tree Level Order Traversal
2.2.23.
Symmetric Tree
2.2.24.
Same Tree
2.2.25.
Merge Sorted Array/List
2.2.26.
Climbing Stairs
2.2.27.
Add Binary
2.2.28.
Implement strStr()
2.2.29.
Palindrome Number
2.2.30.
String To Integer
2.2.31.
Kth Smallest Element in a BST
2.2.32.
Basic Calculator
2.2.33.
Count Complete Tree Nodes
2.2.34.
Maximal Rectangle Square
2.2.35.
Combination Sum
2.2.36.
Kth Largest Element in an Array
2.2.37.
Minimum Size Subarray Sum
2.2.38.
Add and Search Word
2.2.39.
Number of Islands
2.2.40.
Binary Tree Right Side View
2.2.41.
Repeated DNA Sequences
2.2.42.
Largest Number
2.2.43.
Fraction to Recuring Decimal
2.2.44.
Find Peak Element
2.2.45.
Find Minimum in Rotated Sorted Array
2.2.46.
Maximum Product Subarray
2.2.47.
Sort List
2.2.48.
Reorder List
2.2.49.
Linked List Cycle
2.2.50.
Word Break
2.2.51.
Single Number
2.2.52.
Number of Digit One(Two)
2.2.53.
Gas Station
2.2.54.
Word Ladder
2.2.55.
Best Time to Buy and Sell Stock
2.2.56.
Decode Ways
2.2.57.
Unique Binary Search Trees
2.2.58.
Restore IP Addresses
2.2.59.
Sqrt(x)
2.2.60.
Search a 2D Matrix
2.2.61.
Set A Matrix Zeros
2.2.62.
Spiral Matrix
2.2.63.
Power(x, n)
2.2.64.
Rotate Image
2.2.65.
Permutations
2.2.66.
N-Sum
2.2.67.
Container with Most Water
2.2.68.
The Skyline Problem
2.2.69.
Shortest Palindrome
2.2.70.
Dungeon Game
2.2.71.
Maximum Gap
2.2.72.
LRU Cache
2.2.73.
Max Points on a Line
2.2.74.
Slinding Window Maximum
2.2.75.
Candy
2.2.76.
Longest Consecutive Sequence
2.2.77.
Distinct Subsequences
2.2.78.
Recover Binary Search Tree
2.2.79.
Interleaving String
2.2.80.
Populating Next Right Pointers in Each Node
2.2.81.
Scramble String
2.2.82.
Largest Rectangle in Histogram
2.2.83.
Minimum Window Substring
2.2.84.
Edit Distance
2.2.85.
Valid Number
2.2.86.
Insert Interval
2.2.87.
N-Queen
2.2.88.
Merge Intervals
2.2.89.
Wildcard Matching
2.2.90.
Trapping Rain Water
2.2.91.
First Missing Positive
2.2.92.
Sudoku Solver
2.2.93.
Search in Rotated Sorted Array
2.2.94.
Longest Valid Parentheses
2.2.95.
Different Ways to Add Parentheses
2.2.96.
Substring with Concatenation of All Words
2.2.97.
Reverse Nodes in K-Group
2.2.98.
Median of Two Sorted Arrays
2.2.99.
Regular Expression Matching
2.2.100.
Longest Palindromic Substring
2.3.
POJ
2.3.1.
MooFest
2.3.2.
InnerVertices
2.3.3.
Matrix
2.3.4.
Balanced Lineup
2.3.5.
Frequent Values
2.3.6.
Arrange the Bulls
2.3.7.
Corn Fields
2.3.8.
Rectangular Covering
2.3.9.
Quad Tiling
2.3.10.
Training Little Cats
2.3.11.
Cleaning Shifts
2.3.12.
Bad Hair Day
2.3.13.
Sliding Window
2.3.14.
Terrible Sets
2.3.15.
Sunscreen
2.3.16.
Moo University
2.3.17.
Wireless Network
2.3.18.
Find them, Catch them
2.3.19.
River Hopscotch
2.3.20.
Monthly Expense
2.3.21.
Drying
2.3.22.
Cow Acrobats
2.3.23.
Dropping Tests
2.3.24.
KBest
2.3.25.
Mth Matrix
2.3.26.
Telephone Lines
2.3.27.
Garland
2.3.28.
GCD & LCM Inverse
2.3.29.
Dead Fraction
2.3.30.
Prime Path
2.3.31.
X-Factor Chains
2.3.32.
Semi-prime H-numbers
2.3.33.
Pseudoprime Numbers
2.3.34.
Raising Modulo Numbers
2.3.35.
Six Degree of Cowvin Bacon
2.3.36.
Wormhols
2.3.37.
Silver Cow Party
2.3.38.
AgriNet
2.3.39.
Bad Cowtractors
2.3.40.
Out of Hay
2.3.41.
Best Cow Line
2.3.42.
Radar Installation
2.3.43.
Stall Reservation
2.3.44.
Yogurt Factory
2.3.45.
Packets
2.3.46.
Allowance
2.3.47.
Stripies
2.3.48.
Protecting the Flowers
2.3.49.
Cow Bowling
2.3.50.
Sumsets
2.3.51.
Apple Catching
2.3.52.
Milking Time
2.3.53.
Cheapest Palindrome
2.3.54.
Coins
2.3.55.
Ant Counting
2.3.56.
Dollar Dayz
2.3.57.
Wooden Sticks
2.3.58.
Bridging Signals
2.3.59.
Making the Grade
2.3.60.
Space Elevator
2.3.61.
Cow Exhibition
2.3.62.
Red and Black
2.3.63.
Curling 2.0
2.3.64.
Meteor Shower
2.3.65.
Smallest Difference
2.3.66.
Backward Digit Sums
2.3.67.
Hopscotch
2.3.68.
The Water Bowls
2.3.69.
Extended Lights Out
2.3.70.
Subset
2.3.71.
Sumset
2.4.
APAC Test
2.4.1.
2016 Round A
2.4.1.1.
Googol String
2.4.1.2.
gCube
2.4.1.3.
gCampus
2.4.1.4.
gSnake
2.4.2.
2016 Round B
2.4.2.1.
Travel
2.4.2.2.
gWheels
2.4.2.3.
gNumbers
2.4.2.4.
Albocede DNA
2.4.3.
2015 Round A
2.4.3.1.
Seven Segement Display
2.4.3.2.
Super 2048
2.4.3.3.
Addition
2.4.3.4.
Cut Tiles
2.4.4.
2015 Round B
2.4.4.1.
Password Attacker
2.4.4.2.
Card Game
2.4.4.3.
New Years Eye
2.4.4.4.
Parentheses Order
2.4.5.
2015 Round C
2.4.5.1.
Mine Sweeper
2.4.5.2.
Taking Metro
2.4.5.3.
Broken Calculator
2.4.5.4.
Teris
2.4.6.
2015 Round D
2.4.6.1.
CubeIV
2.4.6.2.
GBus Count
2.4.6.3.
Sort a Scrambled Itinerary
2.4.6.4.
Itz Chess
3.
Other Things
3.1.
English Words
Powered by
GitBook
Algorithm Notes