摘要: 1 # include 2 struct Slist{ 3 int size; 4 struct sl* head; 5 }; 6 struct sl{ 7 int k; 8 struct sl* next; 9 }; 10 typedef str... 阅读全文
posted @ 2014-10-27 22:47 UDLD 阅读(208) 评论(0) 推荐(0) 编辑
摘要: /*问题描述,如何在时间复杂度为O(n)的前提下,实现单链表翻转。并尽量减少内存消耗。即1-2-4-5-6转化为6-5-4-2-1。*/ 1 # include 4 struct Slist{ 5 6 int size; 7 struct sl* head; 8 9 10 };... 阅读全文
posted @ 2014-10-27 16:42 UDLD 阅读(546) 评论(0) 推荐(0) 编辑