Chinaunix首页 | 论坛 | 博客
  • 博客访问: 256104
  • 博文数量: 170
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1709
  • 用 户 组: 普通用户
  • 注册时间: 2014-05-06 18:01
文章分类

全部博文(170)

文章存档

2016年(11)

2015年(130)

2014年(29)

发布时间:2015-03-22 11:37:08

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).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 / \ 15 7return its bottom-up level order tr.........【阅读全文】

阅读(198) | 评论(0) | 转发(0)

发布时间:2015-03-21 16:15:10

The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order,We get the following sequence (ie, for n = 3):"123""132""213""231""312""321"Given n a.........【阅读全文】

阅读(175) | 评论(0) | 转发(0)

发布时间:2015-03-20 16:59:15

 Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be ambiguous. You should gather all requirements up f.........【阅读全文】

阅读(161) | 评论(0) | 转发(0)

发布时间:2015-03-20 15:28:48

Combinations Total Accepted: 36487 Total Submissions: 119636My SubmissionsQuestion Solution Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.Fo.........【阅读全文】

阅读(198) | 评论(0) | 转发(0)

发布时间:2015-03-17 15:19:00

Given an array of strings, return all groups of strings that are anagrams.Note: All inputs will be in lower-case.思路:1. 从strs的第一个元素开始遍历,首先对元素进行排序得到s;2. 在map里查找s;3. 若不存在,将s以及该元素的下标存入map<string ,int>;4. 若存在,首先将第.........【阅读全文】

阅读(219) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册