![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
剑指offer刷题
qqkb1016
这个作者很懒,什么都没留下…
展开
-
重排链表
给定一个单链表 L:L0→L1→…→Ln-1→Ln , 将其重新排列后变为: L0→Ln→L1→Ln-1→L2→Ln-2→… 你不能只是单纯的改变节点内部的值,而是需要实际的进行节点交换。 示例1: 给定链表 1->2->3->4, 重新排列为 1->4->2->3. 示例2: 给定链表 1-&a原创 2018-08-06 10:06:02 · 263 阅读 · 0 评论 -
全排列Permutation
Permutations 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]. 解法一:调...原创 2018-07-11 18:02:28 · 257 阅读 · 0 评论