上一页 1 2 3 4 5 6 ··· 35 下一页
摘要: 1 #include"iostream" 2 #include"stdio.h" 3 #include"math.h" 4 using namespace std; 5 6 struct BinaryTreeNode 7 { 8 double m_Value; 9 BinaryTreeNode* m 阅读全文
posted @ 2019-02-24 11:06 Run_For_Love 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 自己答案: 1 ListNode* MergeTwoSortedList(ListNode* pHead1,ListNode* pHead2) 2 { 3 if(pHead1==nullptr&&pHead2==nullptr) 4 return nullptr; 5 6 if(pHead1==nu 阅读全文
posted @ 2019-02-23 19:54 Run_For_Love 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 函数: 1 ListNode* MeetingNode(ListNode* pHead) 2 { 3 if(pHead==nullptr) 4 return nullptr; 5 ListNode* quickNode=pHead; 6 ListNode* slowNode=pHead; 7 8 w 阅读全文
posted @ 2019-02-22 13:58 Run_For_Love 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 注意代码的鲁棒性! 函数: 1 ListNode* TheLastKthNode(ListNode* pHead,int k) 2 { 3 if(pHead==nullptr || k<=0) 4 return nullptr; 5 ListNode* quickNode=pHead; 6 List 阅读全文
posted @ 2019-02-22 13:10 Run_For_Love 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 1 #include"iostream" 2 using namespace std; 3 4 bool IsInt(const char **str); 5 bool IsUnsignInt(const char **str); 6 7 bool IsNumeric(const char* str 阅读全文
posted @ 2019-02-22 10:10 Run_For_Love 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 1 #include"iostream" 2 using namespace std; 3 4 bool MatchCore(char*str,char* pattern); 5 6 bool Match(char* str,char* pattern) 7 { 8 if(str==nullptr| 阅读全文
posted @ 2019-02-21 09:06 Run_For_Love 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 1 // 面试题18(二):删除链表中重复的结点 2 // 题目:在一个排序的链表中,如何删除重复的结点?例如,在图3.4(a)中重复 3 // 结点被删除之后,链表如图3.4(b)所示。 4 5 #include <cstdio> 6 #include "List.h" 7 8 void Dele 阅读全文
posted @ 2019-02-20 20:57 Run_For_Love 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 1 #include"List.h" 2 3 void DeleteNode(ListNode** pHead,ListNode* pToBeDeleted) 4 { 5 if(*pHead==nullptr || pToBeDeleted==nullptr) 6 return; 7 if(pToB 阅读全文
posted @ 2019-02-20 19:52 Run_For_Love 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1 #include"stdio.h" 2 #include"stdlib.h" 3 #include"iostream" 4 using namespace std; 5 6 struct ListNode 7 { 8 int m_Value; 9 ListNode* m_pNext; 10 }; 阅读全文
posted @ 2019-02-20 16:32 Run_For_Love 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 #include"iostream" 2 #include"string.h" 3 using namespace std; 4 5 bool AddOne(char *number,int n); 6 void PrintNumber(char *number,int n); 7 8 void 阅读全文
posted @ 2019-02-20 14:27 Run_For_Love 阅读(322) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 35 下一页