- 博客(10)
- 收藏
- 关注
原创 Algorithms(十六)Permutations II
题目: 47. Permutations II Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following unique permutations: [
2018-01-13 15:58:41 231
原创 Algorithms(十五)Permutations
题目: 46. Permutations Given a collection of distinct numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3], [2,
2018-01-13 14:47:22 164
原创 Algorithms(十四)Pow(x, n)
题目: 50. Pow(x, n) Implement pow(x, n). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 代码: class Solution { public: double myPow(d
2018-01-13 01:29:52 240
原创 Algorithms(十三)Kth Smallest Element in a BST
题目: 230. Kth Smallest Element in a BST Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST'
2018-01-12 21:47:21 178
原创 Algorithms(十二)Best Time to Buy and Sell Stock III
题目: 123. Best Time to Buy and Sell Stock III Say you have an array for which the ith element is the price of a given stock on dayi. Design an algorithm to find the maximum profit. You may com
2018-01-12 21:35:56 162
原创 Algorithms(十一)Unique Paths II
题目: 63. Unique Paths II Follow up for "Unique Paths": Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1
2018-01-12 19:41:43 162
原创 Algorithms(十)Unique Paths
题目: 62. Unique Paths 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 any point in time. The ro
2018-01-12 15:48:25 148
原创 Algorithms(九)Jump Game II
题目: 45. Jump Game II 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 maximum jump length at th
2018-01-12 02:12:24 121
原创 Algorithms(八)Jump Game
题目: 55. Jump Game 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 maximum jump length at that
2018-01-12 01:58:38 160
原创 Algorithms(七)Single Number
题目: 136. Single Number Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you
2018-01-05 15:39:33 175
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人