摘要:
Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o... 阅读全文
posted @ 2015-07-30 21:13 骄阳照林 阅读(104) 评论(0) 推荐(0) 编辑
|
|
摘要:
Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front o... 阅读全文
posted @ 2015-07-30 21:13 骄阳照林 阅读(104) 评论(0) 推荐(0) 编辑
摘要:
Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top()... 阅读全文
posted @ 2015-07-30 20:25 骄阳照林 阅读(162) 评论(0) 推荐(0) 编辑
摘要:
Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right corner as shown ... 阅读全文
posted @ 2015-07-30 16:42 骄阳照林 阅读(92) 评论(0) 推荐(0) 编辑
摘要:
Reverse a singly linked list.解法一:记录单链表每个节点的val,然后重新为单链表赋值。(取巧,仅仅是将val部分改变,原始node节点并没有改变)代码如下:/** * Definition for singly-linked list. * public class L... 阅读全文
posted @ 2015-07-30 15:35 骄阳照林 阅读(108) 评论(0) 推荐(0) 编辑 |
|