摘要: 今天是学习数据结构的第二天,让我们来一起重温数据结构中极为经典的链表。 在复习链表之前我们来复习一个C/C++中很重要的知识点#include #include typedef char ElemType;typedef struct node{ ElemType data; st... 阅读全文
posted @ 2015-07-10 17:40 wgqtmac 阅读(190) 评论(0) 推荐(1)
摘要: 今天心血来潮,突然想重新复习一遍数据结构并将其中的所有内容用C实现一遍。也算是为考研做点准备吧。今天是第一天,先将线性表的顺序表示实现了。 在对算法的复习过程中没有产生太大的问题,插入、删除和查找的操作时间复杂度都是O(n)。因为假设两个线性表是已经排好序的,所以将两个线性表合成一个线性表的操... 阅读全文
posted @ 2015-07-09 08:48 wgqtmac 阅读(351) 评论(0) 推荐(0)
摘要: Given a tree, you are supposed to list all the leaves in the order of top down, and left to right.Input Specification:Each input file contains one tes... 阅读全文
posted @ 2015-04-08 22:34 wgqtmac 阅读(487) 评论(3) 推荐(1)