- 博客(16)
- 收藏
- 关注
原创 606. Construct String from Binary Tree 二叉树的字符串描述
根据给定的二叉树返回根据其建立的字符串,建立原则按照先序序列顺序,有子节点的用括号括起来,叶子节点的括号省略。特别的,若左孩子不存在而有孩子存在,则左孩子的括号不可省略。
2017-08-30 10:30:21
263
原创 624. Maximum Distance in Arrays 数组最大距离
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and calculate the distance. We define the distance between
2017-08-30 10:27:08
441
原创 637. Average of Levels in Binary Tree 二叉树每层平均值
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. 给定一非空二叉树,返回其每层的平均值所构成的数组。
2017-08-30 10:21:52
268
原创 647. Palindromic Substrings 回文子串
Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted as different substrings even they consist
2017-08-30 10:19:14
285
转载 python正则表达式
python正则表达式正则表达式基础1 简单介绍2 数量词的贪婪模式与非贪婪模式3 反斜杠的困扰4 匹配模式re模块1 开始使用re2 Match3 Pattern
2017-08-30 10:11:30
206
转载 30. Substring with Concatenation of All Words
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) ins that is a concatenation of each word in words exactly once and
2016-07-20 13:25:32
185
原创 374. Guess Number Higher or Lower猜数大小
We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I'll tell you whether the number is higher or
2016-07-20 13:23:05
561
原创 367. Valid Perfect Square有效的平方数
Given a positive integer num, write a function which returns True ifnum is a perfect square else False.Note:Do not use any built-in library function such assqrt.Example 1:Input: 16Returns:
2016-07-20 13:21:42
411
原创 300. Longest Increasing Subsequence最长递增子序列
Given an unsorted array of integers, find the length of longest increasing subsequence.For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest increasing subsequence is [2, 3, 7, 101], theref
2016-07-20 13:19:58
781
原创 257. Binary Tree Paths 二叉树的路径
Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->2->5", "1->3"]给定二叉树,返回其所有根到叶的路径。
2016-07-20 13:18:34
274
原创 357. Count Numbers with Unique Digits统计各位不同的数字个数
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n.Example:Given n = 2, return 91. (The answer should be the total numbers in the range of 0 ≤ x < 100, excludin
2016-07-20 13:15:18
589
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人