Loading

摘要: 20. Valid Parentheses 有效的配对 https://leetcode.com/problems/valid-parentheses/ 题目:如果一个字符串只包含‘(’,‘)、’{‘、’}‘、’[‘和’]‘,则确定输入字符串是否有效。打开括号必须由相同类型的括号关闭,则输入字符串是 阅读全文
posted @ 2019-09-24 10:44 brynchen 阅读(176) 评论(0) 推荐(0)
摘要: 二叉树的遍历,注意递归和非递归两种思路。 94. Binary Tree Inorder Traversal 二叉树中序遍历 https://leetcode.com/problems/binary-tree-inorder-traversal/ 题目:给定二叉树,返回节点值的中序遍历。 思路: 1 阅读全文
posted @ 2019-09-24 09:57 brynchen 阅读(158) 评论(0) 推荐(0)