
OJ
文章平均质量分 60
crystal_tyan
沙漠的另一边会是什么,又一片沙漠罢了
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
leetcode [Clone Graph] Java
OJ's undirected graph serialization: Nodes are labeled uniquely. We use # as a separator for each node, and , as a separator for node label and each neighbor of the node. As an example, consider th原创 2015-02-02 20:24:15 · 526 阅读 · 0 评论 -
Leetcode [Min Stack] java
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- Get原创 2015-02-03 10:00:55 · 522 阅读 · 0 评论 -
leetcode [Validate Binary Search Tree] java
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key.The原创 2015-02-05 11:49:39 · 456 阅读 · 0 评论 -
[leetcode] @python Convert Sorted List to Binary Search Tree
好像可以自底向上构造BST吧,不过我是转成array做的# Definition for a binary tree node # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # # Definit原创 2015-03-11 14:13:16 · 1075 阅读 · 0 评论