摘要:
Vertical Order Traversal of a Binary Tree (M) 题目 Given a binary tree, return the vertical order traversal of its nodes values. For each node at positi 阅读全文
摘要:
Find All Duplicates in an Array (M) 题目 Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once 阅读全文
摘要:
Add and Search Word - Data structure design (M) 题目 Design a data structure that supports the following two operations: void addWord(word) bool search( 阅读全文
摘要:
Implement Trie (Prefix Tree) (M) 题目 Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple" 阅读全文
摘要:
Valid Palindrome (E) 题目 Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the pu 阅读全文
摘要:
Design HashSet (E) 题目 Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: ad 阅读全文
摘要:
Detect Capital (E) 题目 Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word t 阅读全文
摘要:
Climbing Stairs (E) 题目 You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many d 阅读全文
摘要:
Word Break II (H) 题目 Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, add spaces in s to construct a sentenc 阅读全文
摘要:
Best Time to Buy and Sell Stock with Cooldown (M) 题目 Say you have an array for which the ith element is the price of a given stock on day i. Design an 阅读全文