面试刷题笔记
小土刀的面试刷题笔记:从前期准备、解题思路到基础知识,覆盖数组、链表、树图、递归动态规划、排序搜索、位运算等经典题型,并附 Google、Facebook、Amazon 等公司的介绍与面经。
428 篇 · 按题型浏览
专题目录
公司介绍及面经30 篇
网络3 篇
测试4 篇
面向对象设计26 篇
- Add and Search Word Data structure design
- Animal Shelter
- Call Center
- Chat Server
- Deck of Cards
- Elevator
- File System
- Hash Table
- Jigsaw
- Jukebox
- LRU Cache
- Minesweeper
- Music Player
- Online Book Reader
- Othello
- Parking Lot
- Pastebin
- Peeking Iterator
- Personal Financial Manager
- Rank from Stream
- Sales Rank
- Singleton
- Social Network
- Stock Data
- Tiny URL
- Web Crawler
数学逻辑28 篇
- 100 Lockers
- Add Digits
- Ants on a Triangle
- The Apocalypse
- Basketball
- Cosine Similarity
- Count Primes
- 均分 01
- Divide Number
- The Egg Drop Problem
- Factorial Trailing Zeroes
- Fraction to Recurring Decimal
- Happy Number
- Hash Function
- The Heavy Pill
- Index of Permutation II
- Index of Permuation
- Jugs of Water
- Max Points on a Line
- Next Permutation
- Number of Digit One
- Number of Digit
- Perfect Squares
- Permutation Sequence
- Poison
- Previous Permuation
- Quick Pow
- Remove Digit
位操作15 篇
树和图62 篇
- All Path
- Balance Tree
- Binary Search Tree Iterator
- Binary Tree Depth
- Construct Binary Tree from Inorder and Postorder Traversal
- Construct Binary Tree from Preorder and Inorder Traversal
- Binary Tree to Linked List
- BST Sequences
- Build Order
- Same Tree
- Symmetric Tree
- Clone Graph
- Complete Tree Node Count
- Connected Nodes in Undirected Graph
- Course Schedule II
- Course Schedule
- Cut Wood
- Delete Middle Node
- Delete Node in a Linked List
- Different BST II
- Different BST
- First Common Ancestor of a Binary Search Tree
- First Common Ancestor
- Flatten Binary Tree to Linked List
- Inorder Traversal
- Insert node to BST
- Is Subtree
- Kth Smallest Element in a BST
- Leaf Path Sum
- Level Order Traversal II
- Level Order Traversal
- Height of Binary Tree
- Maximum Path Sum
- Min Height of Binary Tree
- Minimum Path Sum
- Neighbor Node
- Next Node in BST
- Next Node
- Next Node without Parent
- Populating Next Right Pointers in Each Node
- Paths with Sum II
- Node Path Sum
- Postorder Traversal
- Preorder Traversal
- Recover Binary Search Tree
- Reverse Binary Tree
- Binary Tree Right Side View
- Root Path Sum
- Route Between Nodes
- Scramble String
- Search Range
- Serialize and Deserialize
- Sorted Array to Binary Search Tree
- Convert Sorted List to Binary Search Tree
- Topological Sort
- Implement Trie (Prefix Tree)
- Unique Binary Search Trees II
- Unique Binary Search Trees
- Valid Binary Search Tree
- Word Ladder II
- Word Ladder
- Zigzag Level Order Traversal
排序和搜索34 篇
- Binary Search
- Count Plane
- 名人问题
- Find Peak Element
- First Error Version
- First Missing Positive Number
- Group Anagrams List
- Group Anagrams
- Hit Counter
- Index Equals to Value
- Inverted Index
- Kth Largest Element
- Kth Largest in Sorted Matrix
- Kth Smallest Number
- Maximum Gap
- Median of Two Sorted Array
- Find Minimum in Rotated Sorted Array
- Missing Number
- Nuts & Bolts Problem
- Recursive Integer Traversal
- Search 2D matrix
- Search Insert Position
- Search Range
- Search Rotated Array
- Social Network
- Sort Age
- Sort Big File
- Sort Colors II
- Sort Colors
- Sorted Search, No Size
- Sparse Search
- Sqrt(x)
- Stream Integer
- URL Duplicates
递归和动态规划80 篇
- All Permutations II
- All Permutation
- All Subsets
- Best Time to Buy and Sell Stock II
- Best Time to Buy and Sell Stock III
- Best Time to Buy and Sell Stock IV
- Best Time to Buy and Sell Stock
- Boggle Game: Word Search II
- Boggle Game Word Search
- Climb Stairs Triple Step
- Climb Stairs
- Coin Game II
- Coin Game
- Coin
- Combination Sum II
- Combination Sum III
- Combination Sum
- Combinations
- Container with Most Water
- Decode Ways
- Different Subsequence
- Different Ways to Add Parentheses
- Dungeon Game
- Edit Distance
- Expression Add Operators
- Fibonacci
- Gas Station
- Generate Parentheses
- House Robbery II
- House Robbery
- Interleaving String
- Jump Game II
- Jump Game
- Kth Permuation
- Largest Rectangle in Histogram
- Longest Common Subsequence
- Longest Common Substring
- Longest Increasing Consecutive Sequence
- Longest Increasing Sequence
- Longest Palindromic Substring
- Longest Substring with K Unique Characters
- Longest Substring Without Repeating Characters
- Max Difference 2 Subarray
- Max Product Subarray
- Maximal Rectangle
- Max Square
- Max Sum 2 Subarray
- Max Sum Subarray Index
- Maximum Subarray
- Min Adjustment Cost
- Min Sum Subarray
- Minimum Window Substring
- Minimum Subarray for Sum
- NQueens II
- N Queen
- Nth Prime
- Number of Islande
- Package Problem II
- Package Problem
- Paint Fill
- Palindrom Partition
- Palindrome Partitioning II
- Pow(x, n)
- Product of Array Except Self
- Recursive Multiply
- Regular Expression Matching
- Restore IP Addresses
- Stack of Box
- Subarray Sum to K
- Continuous Subarray Sum
- Surrounded Regions
- Towers of Hanoi
- Trap Water
- Ugly Number II
- Ugly Number
- Unique Path II
- Unique Path
- Wildcard Matching
- Word Break II
- Word Break
链表25 篇
- Add Two Numbers
- Check Cycle
- Check Intersection
- Palindrome Linked List
- Copy List with Random Pointer
- Insertion Sort List
- Kth to Last
- Merge K Linked List
- Merge Two Lists
- Middle of List
- Partitiom List Sorted
- Partition Linked List
- Remove Duplicates from Sorted List II
- Remove Duplicates from Sorted List
- Remove Duplicates from Unsorted List
- Remove Linked List Elements
- Reorder List
- Reverse List Range
- Reverse List
- Reverse Nodes in kGroup
- Reversely List Traverse
- Rotate List
- Sort List
- Start of Circle
- Swap Adjacent Node
堆栈和队列12 篇
数组和字符串89 篇
- 2 Sum
- 3 Sum Closest
- 3 Sum
- 4 Sum
- Add Binary
- Add One
- Binary to String
- Candy
- Check Duplicate II
- Check Duplicate III
- Find Duplicates
- Check Duplicate
- Palindrome Number
- Check Palindrome
- Palindrome Permutation
- Check Permutation
- Check Valid Number
- Check Valid Sudoku
- Compare Version Numbers
- Count and Say
- Determine String Permutation
- Evaluate Reverse Polish Notation
- Excel Sheet Column Number
- Excel Sheet Column Title
- Find Anagram
- Game of Life
- Gray Code
- HIndex II
- HIndex
- Heapify
- Insert Range
- Integer to English Words
- Integer to Roman
- Interleaving Array
- Isomorphic Strings
- K Sum II
- Largest Number
- Length of Last Word
- Letter Combinations of a Phone Number
- Longest Common Prefix
- Longest Consecutive Sequence
- Longest Word in Dictionary
- Majority Element II
- Majority Element III
- Majority Element
- Matrix ZigZag Traversal
- 最大间隔问题
- Median of Unsorted Array
- Merge Range
- Sorted Two Sorted Array II
- Merge Two Sorted Array
- Min Difference 2 Array
- Min Triangle Path Sum
- Modify String
- Move Zeroes
- Multiply Strings
- 二进制矩阵中 1 的个数
- 奇偶调序
- One Away
- Pascal's Triangle II
- Pascal's Triangle
- Peaks and Valleys
- Remove Duplicates from Sorted Array II
- Remove Duplicates from Sorted Array
- Remove Element
- Reorder Rotated Array
- Reorder String by Case
- Repeated DNA Sequences
- Reverse Integer
- Reverse Sentence
- Roman to Integer
- Rotate Array
- Rotate Image
- Rotate String
- 01 相等的串
- Set Matrix Zero
- Shortest Palindrome
- Simplify File Path
- Spiral Matrix II
- Spiral Matrix
- String Comparison
- String Composition
- String Compression
- Implement strStr()
- Submatrix Sum Zero
- !!Substring with Concatenation of All Words
- Text Justification
- Unique Character
- ZigZag Conversion