摘要: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu... 阅读全文
posted @ 2014-04-18 19:10 xchangcheng 阅读(168) 评论(0) 推荐(0)
摘要: Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam... 阅读全文
posted @ 2014-04-18 14:37 xchangcheng 阅读(169) 评论(0) 推荐(0)