Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never differ by more than 1....
分类:
其他好文 时间:
2015-05-01 17:25:28
阅读次数:
115
Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
...
分类:
其他好文 时间:
2015-05-01 16:08:47
阅读次数:
167
1. 题目Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer, replace the number by the sum of the square...
分类:
移动开发 时间:
2015-05-01 14:50:56
阅读次数:
134
题目:Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive inte...
分类:
移动开发 时间:
2015-05-01 07:10:07
阅读次数:
143
题目:Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?代码:用hashmap版/** * Definition for singly...
分类:
其他好文 时间:
2015-05-01 00:25:22
阅读次数:
157
Given two strings s and t, determine if they are isomorphic.
Two strings are isomorphic if the characters in s can be replaced to get t.
All occurrences of a character must be replaced with anot...
分类:
其他好文 时间:
2015-04-30 21:52:56
阅读次数:
207
Happy NumberWrite an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any posi...
分类:
移动开发 时间:
2015-04-30 21:51:17
阅读次数:
174
Givenabinarytreeandasum,determineifthetreehasaroot-to-leafpathsuchthataddingupallthevaluesalongthepathequalsthegivensum.Forexample:Giventhebelowbinarytreeandsum=22,5
/48
//11134
/\721returntrue,asthereexistaroot-to-leafpath5->4->11->2whichsum..
分类:
其他好文 时间:
2015-04-30 20:22:50
阅读次数:
100
本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/45396585
Write an algorithm to determine if a number is "happy".
A happy number is a number defined by the following process: Starting with any positive integer, replace th...
分类:
移动开发 时间:
2015-04-30 18:20:49
阅读次数:
141
https://help.ubuntu.com/community/MacBookProDetermine your hardware revisionTo determine which version / generation of MacBook Pro you have, you have ...
分类:
系统相关 时间:
2015-04-30 18:03:18
阅读次数:
394