摘要: 1 /* 2 Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. 3 ... 阅读全文
posted @ 2014-06-06 14:13 莽莽de老壳子 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 题目链接: here。题目描述: Sort a linked list using insertion sort. 题目要求使用插入排序的方法来实现单链表的排序。插入排序是一种简单的排序,算法描述参考维基百科,或者《算法导论》。 下面是我实现的代码: 1 /** 2 Author:... 阅读全文
posted @ 2014-06-06 10:18 莽莽de老壳子 阅读(196) 评论(0) 推荐(0) 编辑