- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 permutations
题目链接:https://leetcode.com/problems/permutations/description/描述Given a collection of distinct numbers, return all possible permutations. 输入For example, [1,2,3] have the following permutations:[ [1,2
2017-09-20 10:32:44
253
原创 Rotate List
题目链接:https://leetcode.com/problems/rotate-list/description/描述Given a list, rotate the list to the right by k places, where k is non-negative.输入Given 1->2->3->4->5->NULL and k = 2,输出return 4->5->1->2->3
2017-09-19 15:33:13
307
原创 Reorder List
题目链接:https://leetcode.com/problems/reorder-list/description/描述Given a singly linked list L: L0?L1?…?Ln-1?Ln, reorder it to: L0?Ln?L1?Ln-1?L2?Ln-2?…You must do this in-place without altering the nodes’
2017-09-19 15:25:43
308
原创 Path Sum 2
题目链接:https://leetcode.com/problems/path-sum-ii/description/描述Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. .输入For example: Given the below bina
2017-09-18 19:40:44
472
转载 Sort a linked list in O(n log n) time using constant space complexity.
题目链接:https://leetcode.com/problems/sort-list/description/描述Sort a linked list in O(n log n) time using constant space complexity.输入输出样例输入样例输出算法思想:利用归并排序的时间复杂度为O(nlogn),进行排序源代码class Solution {public:
2017-09-18 16:07:24
413
原创 Evaluate the value of an arithmetic expression in Reverse Polish Notation.
题目链接:https://leetcode.com/problems/evaluate-reverse-polish-notation/description/描述Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand
2017-09-14 17:01:54
284
原创 Given an array of integers, every element appears twice except for one. Find that single one.
题目链接:https://leetcode.com/problems/single-number/description/描述Given an array of integers, every element appears twice except for one. Find that single one.Note: Your algorithm should have a linear ru
2017-09-13 14:33:48
587
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人