2012年8月31日
摘要: 之前学数据结构的时候用的是C/C++,一直用的是指针,用python之后很好奇怎么来实现这些数据结构,看了Python Algorithms - Mastering Basic Algorithms in the Python Language 之后,原来是酱紫啊,实现一下。 链表先是Nodeclass Node(object): def __init__(self, value, next=None): self.value = value self.next = next酱紫就可以实现链表了没有指针的时候,原来是递归的声明啊。。。list类,只写... 阅读全文
posted @ 2012-08-31 16:59 duoduo3_69 阅读(1146) 评论(0) 推荐(0) 编辑