摘要:
Trapping Rain Water (H) 题目 Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is 阅读全文
摘要:
Flatten Nested List Iterator (M) 题目 Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer, or a list 阅读全文
摘要:
Integer Break (M) 题目 Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. R 阅读全文
摘要:
Reverse Vowels of a String (E) 题目 Write a function that takes a string as input and reverse only the vowels of a string. Example 1: Input: "hello" Out 阅读全文
摘要:
Coin Change (M) 题目 You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of 阅读全文
摘要:
Reverse String (E) 题目 Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space 阅读全文
摘要:
Range Sum Query 2D - Immutable (M) 题目 Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (ro 阅读全文
摘要:
Range Sum Query - Immutable (E) 题目 Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example: Give 阅读全文
摘要:
First Missing Positive (H) 题目 Given an unsorted integer array, find the smallest missing positive integer. Example 1: Input: [1,2,0] Output: 3 Example 阅读全文
摘要:
Combination Sum II (M) 题目 Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidate 阅读全文