上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: 题目: 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 阅读全文
posted @ 2017-06-16 20:37 荒野第一快递员 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 题目: Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Calling next() will return t 阅读全文
posted @ 2017-06-16 20:06 荒野第一快递员 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- R 阅读全文
posted @ 2017-06-16 15:07 荒野第一快递员 阅读(619) 评论(0) 推荐(0) 编辑
摘要: 题目: Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, *, /. Each operand may be an integer or anoth 阅读全文
posted @ 2017-06-16 10:56 荒野第一快递员 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. 题意及分析:后序遍历,先遍历左 阅读全文
posted @ 2017-06-16 10:24 荒野第一快递员 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [1,2,3]. 题意及分析:给出一个二叉树,求先 阅读全文
posted @ 2017-06-15 14:53 荒野第一快递员 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level 阅读全文
posted @ 2017-06-15 12:30 荒野第一快递员 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. 题意及分析:简单来讲就是给出 阅读全文
posted @ 2017-06-15 10:02 荒野第一快递员 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of integers that might contain duplicates, nums, return all possible subsets. Note: The solution set must not contain duplicate 阅读全文
posted @ 2017-06-14 14:40 荒野第一快递员 阅读(784) 评论(0) 推荐(0) 编辑
摘要: 题目: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total 阅读全文
posted @ 2017-06-14 10:46 荒野第一快递员 阅读(750) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页