摘要:
题目:Design and implement a data structure for Least Recently Used (LRU) cache. It should support th... 阅读全文
摘要:
题目:Design a stack that supports push, pop, top, and retrieving the minimum element in constant tim... 阅读全文
摘要:
题目:A linked list is given such that each node contains an additional random pointer which could po... 阅读全文
摘要:
题目:A message containing letters from A-Z is being encoded to numbers using the following mapping:'... 阅读全文
摘要:
题目:Follow up for problem "Populating Next Right Pointers in Each Node".What if the given tree coul... 阅读全文
摘要:
题目:Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right;... 阅读全文
摘要:
题目:Reverse a singly linked list.思路:这很简单,每次新建一个链表,并设立tail 尾节点,每次指向他。注意一种方法,每次在链表开始出添加一个新的链表。(非常重要)代... 阅读全文
摘要:
题目:Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1-... 阅读全文