Google Interview Challenge
https://www.1111.com.tw/1000w/fanshome/discussTopic.asp?cat=FANS&id=301667
https://www.gushiciku.cn/pl/gyQP/zh-tw
https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed
https://docs.google.com/spreadsheets/d/1yRCOJ8KysRVkq0O9IlDriT01tC6lzPapmFO4PCmDJQA/edit#gid=126913158 Google面試準備 刷題類型
- Arrays
- Binary Search Tree
- Binary Tree
- Dynamic Programming
- Greedy
- Graph – BFS、DFS
- Heap
- LinkedList
- Recursion
- Searching – Binary Search、Quick Select
- Stack
- String
- Sorting
- Topological sorting
- Trie
Google面試經典題目
- coin change
- coin change 2
- Unique path
- Unique path 2
- Permutation
- Permutation 2
- subset
- subset 2
- search in rotated sorted array
- search in rotated sorted array 2
- word break
- word break 2
- jump game
- jump game 2
- word search
- word search 2
- combination
- combination 2
- meeting room
- meeting room 2
- number of islands
- number of islands 2
- number of distinct island
- number of distinct island 2
BQ準備 Imagine you worked in a project or a team that had a problematic culture Tell about the leading experience of a group project Thinking about a time you were given a large amount of work to complete under the tight deadline Tell about a time you face a problem without having clear solution How do you solve the conflict that happen in the team
Blind 75
Array
- Two Sum
- Best Time to Buy and Sell Stock
- Contains Duplicate
- Product of Array Except Self (M)
- Maximum Subarray
- Maximum Product Subarray
- Find Minimum in Rotated Sorted Array (M)
- Search in Rotated Sorted Array
- 3 Sum
- Container With Most Water
Binary
Dynamic Programming
- Climbing Stairs
- Coin Change
- Longest Increasing Subsequence
- Longest Common Subsequence
- Word Break Problem
- Combination Sum
- House Robber
- House Robber II
- Decode Ways
- Unique Paths
- Jump Game
Graph
- Clone Graph
- Course Schedule
- Pacific Atlantic Water Flow (M)
- Number of Islands
- Longest Consecutive Sequence (M)
- Alien Dictionary (Leetcode Premium) (H) Key: directed graph + DFS or BFS
- Graph Valid Tree (Leetcode Premium) (M) Key: Check edges number first and then check unconnected component (Graph theory), Union Find!
- Number of Connected Components in an Undirected Graph (Leetcode Premium) (M)
Interval
- Insert Interval
- Merge Intervals
- Non-overlapping Intervals (M) Key: greedy
- Meeting Rooms (Leetcode Premium)
- Meeting Rooms II (Leetcode Premium)
Linked List
- Reverse a Linked List
- Detect Cycle in a Linked List
- Merge Two Sorted Lists
- Merge K Sorted Lists
- Remove Nth Node From End Of List
- Reorder List (M)
Matrix
String
- Longest Substring Without Repeating Characters
- Longest Repeating Character Replacement
- Minimum Window Substring (H) Key: Optimized Sliding Windows!
- Valid Anagram
- Group Anagrams
- Valid Parentheses
- Valid Palindrome
- Longest Palindromic Substring Key: Manacher’s Algorithm
- Palindromic Substrings (M) Key: Manacher’s Algorithm
- Encode and Decode Strings (Leetcode Premium) (M)
Tree
- Maximum Depth of Binary Tree
- Same Tree
- Invert/Flip Binary Tree
- Binary Tree Maximum Path Sum (H)
- Binary Tree Level Order Traversal (M)
- Serialize and Deserialize Binary Tree (H)
- Subtree of Another Tree
- Construct Binary Tree from Preorder and Inorder Traversal (M)
- Validate Binary Search Tree
- Kth Smallest Element in a BST (M)
- Lowest Common Ancestor of BST
- Implement Trie (Prefix Tree) (M)
- Add and Search Word (M)
- Word Search II
Heap
Tips
https://hackernoon.com/14-patterns-to-ace-any-coding-interview-question-c5bb3357f6ed
Funny One
- Count Unique Characters of All Substrings of a Given String Key: really special solution
- Find the Duplicate Number
- Find Leaves of Binary Tree
- Split Array Largest Sum Key: Binary Search!!!
- Trapping Rain Water
- The Skyline Problem Key: Select the building with heapqueue
- Largest Rectangle in Histogram Key: tricky Apply with stack!!!
- Subtree of Another Tree Key: Markle Hash
- Substring with Concatenation of All Words Key: Sliding Window
- Longest Valid Parentheses key: Two pointer or DP or Stack
- Best Time to Buy and Sell Stock IV Key: Tricky One pass solution (DP or O(k) space)
- Design HashSet Key: Multiplicative hashing
- Unique Binary Search Trees Key: Catalan number!
- Shortest Path in a Grid with Obstacles Elimination Key: BFS + A*
- Student Attendance Record II Key: hardhard DP
- Guess the Word Key: Game theroy, compare with previous
- Min Cost to Connect All Points Key: minmun spanning tree!! (Prim’s or )
- Path With Minimum Effort Key: Binary search space
- 132 Pattern Key: stack+min array