写了几个问题的代码
This commit is contained in:
+2
-8
@@ -1,4 +1,5 @@
|
||||
|
||||
链表常常碰到的问题有:
|
||||
|
||||
链表反转
|
||||
链表中是否有环
|
||||
@@ -10,6 +11,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
判断俩个链表是否相交
|
||||
给出俩个单向链表的头指针,比如h1,h2,判断这俩个链表是否相交。
|
||||
为了简化问题,我们假设俩个链表均不带环。
|
||||
@@ -38,12 +40,6 @@ struct ListNode
|
||||
|
||||
|
||||
|
||||
链表操作,
|
||||
(1)单链表就地逆置,
|
||||
(2)合并链表
|
||||
|
||||
|
||||
|
||||
|
||||
30、微软面试题:Given a head pointer pointing to a linked list ,please write a function that sort the list
|
||||
in increasing order. You are not allowed to use temporary array or memory copy
|
||||
@@ -130,7 +126,6 @@ struct ListNode
|
||||
{
|
||||
|
||||
int m_nKey;
|
||||
|
||||
ListNode* m_pNext;
|
||||
|
||||
};
|
||||
@@ -152,7 +147,6 @@ struct ListNode
|
||||
{
|
||||
|
||||
int m_nKey;
|
||||
|
||||
ListNode* m_pNext;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user