04 2015 档案
摘要: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...
阅读全文
摘要:Isomorphic StringsGiven two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All...
阅读全文
摘要:Bitwise AND of Numbers RangeGiven a range [m, n] where 0 = (int)pow(2.0, i)) && (ind+gap <= (int)pow(2.0, i+1)-1)) //all 1's ...
阅读全文
摘要:Repeated DNA SequencesAll DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it i...
阅读全文
摘要:Number of IslandsGiven a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by con...
阅读全文
摘要:Binary Tree Right Side ViewGiven a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered fr...
阅读全文
摘要:House RobberYou are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint...
阅读全文
摘要:最好在定义的时候就给出初始值。类和结构体给出构造函数。比如int,在vs的debug和release模式下,初始化的值是不同的。
阅读全文