File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1+ 题目描述:一个链表,奇数位升序偶数位降序,让链表变成升序的。
2+
3+ 比如:1 8 3 6 5 4 7 2 9,最后输出1 2 3 4 5 6 7 8 9。
4+
5+ 分析:
6+
7+ 这道题可以分成三步:
8+
9+ 首先根据奇数位和偶数位拆分成两个链表。
10+
11+ 然后对偶数链表进行反转。
12+
13+ 最后将两个有序链表进行合并。
14+
Original file line number Diff line number Diff line change @@ -46,9 +46,10 @@ PS:除开知识点,一定要准备好以下套路:
4646### 在线编程
4747* [ 二叉树反转] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-二叉树反转.md )
4848* [ 链表相加] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-链表相加.md )
49+ * [ 奇偶链表排序] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-奇偶链表排序.md )
4950* [ LRU淘汰算法] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-LRU淘汰算法.md )
50- * [ 连续子数组最大和] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-合并有序数组 .md )
51- * [ 合并有序数组] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-连续子数组最大和 .md )
51+ * [ 连续子数组最大和] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-连续子数组最大和 .md )
52+ * [ 合并有序数组] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-合并有序数组 .md )
5253* [ 快速排序] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-快速排序.md )
5354* [ 第k大个数] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-第k大个数.md )
5455* [ 交替打印奇偶数] ( https://github.com/xbox1994/2018-Java-Interview/blob/master/MD/在线编程-交替打印奇偶数.md )
You can’t perform that action at this time.
0 commit comments