摘要:
题目描述: Implement pow(x, n). 解题思路: 注意n可能是INT_MIN。 阅读全文
摘要:
题目描述: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may 阅读全文
摘要:
题目描述: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: Elements in a subset must be in non-desce 阅读全文
摘要:
题目描述: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words 阅读全文
摘要:
题目描述: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight). For example, the 3 阅读全文
摘要:
题目描述: Given a set of distinct integers, nums, return all possible subsets. Note: Elements in a subset must be in non-descending order. The solution se 阅读全文
摘要:
题目描述: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is: 解题思路: 阅读全文
摘要:
题目描述: Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its 阅读全文
摘要:
题目描述: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your 阅读全文
摘要:
题目描述: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at 阅读全文