摘要: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. Note: Recursive sol 阅读全文
posted @ 2017-03-23 11:32 CodesKiller 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-03-23 10:28 CodesKiller 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Given an array of numbers, verify whether it is the correct preorder traversal sequence of a binary search tree. You may assume each number in the seq 阅读全文
posted @ 2017-03-23 08:42 CodesKiller 阅读(149) 评论(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]. Note: Recursive solu 阅读全文
posted @ 2017-03-23 06:40 CodesKiller 阅读(152) 评论(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]. Note: Recursive so 阅读全文
posted @ 2017-03-23 06:06 CodesKiller 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: 阅读全文
posted @ 2017-03-23 02:48 CodesKiller 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2017-03-23 01:09 CodesKiller 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 我觉得这是一个非常有意思的问题,Math.abs(-2147483648)的返回值应该是什么? java计算结果 为什么没有得到正数结果呢? 首先我们先看下java区分整数正负的原理。在二进制的情况下,java使用0和1来代表正和负,最高位——左面第一位为1代表负数,最高位为0就代表正数。在32位的 阅读全文
posted @ 2017-03-23 00:34 CodesKiller 阅读(1148) 评论(0) 推荐(0) 编辑