上一页 1 ··· 7 8 9 10 11 12 13 下一页
摘要: 题目描述: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced binary tre 阅读全文
posted @ 2018-02-09 23:56 宵夜在哪 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root) 阅读全文
posted @ 2018-02-08 20:17 宵夜在哪 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the fart 阅读全文
posted @ 2018-02-08 17:40 宵夜在哪 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is 阅读全文
posted @ 2018-02-07 21:06 宵夜在哪 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally 阅读全文
posted @ 2018-02-07 20:32 宵夜在哪 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: You may assume that nums1 has enough space (s 阅读全文
posted @ 2018-02-06 16:17 宵夜在哪 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a sorted linked list, delete all duplicates such that each element appear only once. For example, Given 1->1->2, return 1->2. Given 1->1-> 阅读全文
posted @ 2018-02-06 14:37 宵夜在哪 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Implement int sqrt(int x). Compute and return the square root of x. x is guaranteed to be a non-negative integer. 本题让我们写一个类似sqrt()的函数,不过返回值和输入值都 阅读全文
posted @ 2018-02-05 10:26 宵夜在哪 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 题目描述: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can 阅读全文
posted @ 2018-02-05 10:12 宵夜在哪 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 本题给我们两个字符串形式的二进制数,让我们计算相加之后的结果。 解 阅读全文
posted @ 2018-02-04 19:57 宵夜在哪 阅读(75) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 下一页