码迷,mamicode.com
首页 >  
搜索关键字:whether    ( 1481个结果
【Leetcode】Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. 思路:若使用【Leetcode】Reverse Integer 的方法,判断反转后的整数是否与原整数相同,则可能出现溢出情况;又因为题目要求不适用额外空间,可以之间对比整数第一个与最后一个数的值,再依次类推。 class Solution {...
分类:其他好文   时间:2014-06-22 20:43:56    阅读次数:187
Geeks - Check whether a given graph is Bipartite or not 二分图检查
检查一个图是否是二分图的算法 使用的是宽度搜索: 1 初始化一个颜色记录数组 2 利用queue宽度遍历图 3 从任意源点出发,染色0, 或1 4 遍历这点的邻接点,如果没有染色就染色与这个源点相反的颜色,如果已经染色并且和源点的值相反,那么就是合法点,如果是相同的颜色,那么就不能是二分图   参考:http://www.geeksforgeeks.org/bipartite-gra...
分类:其他好文   时间:2014-06-22 18:35:43    阅读次数:223
leetcode - Symmetric Tree
题目:Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmet...
分类:其他好文   时间:2014-06-20 18:44:41    阅读次数:279
[LeetCode OJ] Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:其他好文   时间:2014-06-18 13:29:31    阅读次数:214
Palindrome Number
题目 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to ...
分类:其他好文   时间:2014-06-17 16:12:39    阅读次数:226
LeetCode——Symmetric Tree
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the f...
分类:其他好文   时间:2014-06-15 19:49:35    阅读次数:176
Leetcode:Symmetric Tree 判断对称树
Symmetric TreeGiven a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric...
分类:其他好文   时间:2014-06-15 18:55:36    阅读次数:188
[Swift] 数组恒等 === 的 bug?!
数组的恒等 === 在文档中是这么说的: Check whether two arrays or subarrays share the same storage and elements by comparing them with the identity operators (=== and !==). 数组的恒等 === 判断即判断两个数组所指向的元素存储区是否相同。 但 XCode 6 测试下来,结果大为迥异:var a = [1, 2, 3]; a === a 其结果却为 false,...
分类:其他好文   时间:2014-06-14 11:39:39    阅读次数:280
leetcode--Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:其他好文   时间:2014-06-14 08:52:31    阅读次数:265
Oracle 11g安装报错Environment variable: "PATH"
Environment variable: "PATH" - This test checks whether the length of the environment variable "PATH" does not exceed the recommended length.预期值:1023实...
分类:数据库   时间:2014-06-12 17:25:20    阅读次数:633
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!