![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 85
十觞亦不醉
编程浪子
展开
-
LeetCode(31): Next Permutation (C++)
题目 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possible, it must rearrange it as the lowest po原创 2015-11-17 14:44:02 · 600 阅读 · 0 评论 -
LeetCode(46): Permutations (C++)
一、题目 Given a collection of numbers, return all possible permutations.For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2],[2,1,3], [2,3,1], [3,1,2], and [3,2,1].二、原创 2015-12-01 10:00:16 · 1765 阅读 · 0 评论 -
LeetCode(60): Permutation Sequence (C++)
一、题目The set[1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""2原创 2015-12-01 10:44:16 · 1019 阅读 · 0 评论 -
LeetCode(92): Reverse Linked List II (C++)
一、题目Reverse a linked list from position m ton. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL,m = 2 and n = 4,return 1->4->3->2->5->NULL.Note:Given m, n satis原创 2015-12-03 15:14:13 · 532 阅读 · 0 评论