写了几个问题的代码

This commit is contained in:
nonstriater
2014-05-06 14:38:24 +08:00
parent 967e267774
commit 9d741769df
17 changed files with 449 additions and 74 deletions
+2 -8
View File
@@ -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;
};