摘要:
Best Time to Buy and Sell Stock IV (H) 题目 You are given an integer array prices where prices[i] is the price of a given stock on the ith day. Design a 阅读全文
摘要:
Search a 2D Matrix (M) 题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integer 阅读全文
摘要:
Rotate Array (E) 题目 Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Out 阅读全文
摘要:
Sort List (M) 题目 Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Inp 阅读全文
摘要:
Buddy Strings (E) 题目 Given two strings A and B of lowercase letters, return true if you can swap two letters in A so the result is equal to B, otherwi 阅读全文
摘要:
Remove Duplicate Letters (M) 题目 Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your re 阅读全文
摘要:
Minimum Number of Arrows to Burst Balloons (M) 题目 There are some spherical balloons spread in two-dimensional space. For each balloon, provided input 阅读全文
摘要:
Serialize and Deserialize BST (M) 题目 Serialization is converting a data structure or object into a sequence of bits so that it can be stored in a file 阅读全文
摘要:
Binary Search (E) 题目 Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in num 阅读全文
摘要:
Insert into a Binary Search Tree (M) 题目 You are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root 阅读全文