上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 43 下一页

2015年12月17日

201. Bitwise AND of Numbers Range (Bit)

摘要: Given a range [m, n] where 0 >= 1; n >>= 1; shift++; } return (m << shift); }}; 阅读全文

posted @ 2015-12-17 08:14 joannae 阅读(230) 评论(0) 推荐(0) 编辑

2015年12月16日

200. Number of Islands (Graph)

摘要: Given 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 connecting adjacen... 阅读全文

posted @ 2015-12-16 14:56 joannae 阅读(181) 评论(0) 推荐(0) 编辑

199. Binary Tree Right Side View (Tree, Stack)

摘要: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom.For exam... 阅读全文

posted @ 2015-12-16 14:18 joannae 阅读(190) 评论(0) 推荐(0) 编辑

198. House Robber(Array; DP)

摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo... 阅读全文

posted @ 2015-12-16 13:29 joannae 阅读(176) 评论(0) 推荐(0) 编辑

191. Number of 1 Bits (Int; Bit)

摘要: Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit i... 阅读全文

posted @ 2015-12-16 12:37 joannae 阅读(156) 评论(0) 推荐(0) 编辑

190. Reverse Bits (Int; Bit)

摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 阅读全文

posted @ 2015-12-16 12:29 joannae 阅读(199) 评论(0) 推荐(0) 编辑

189. Rotate Array(Array)

摘要: Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4].Note:... 阅读全文

posted @ 2015-12-16 10:58 joannae 阅读(155) 评论(0) 推荐(0) 编辑

188. Best Time to Buy and Sell Stock IV (Array; DP)

摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet... 阅读全文

posted @ 2015-12-16 08:46 joannae 阅读(132) 评论(0) 推荐(0) 编辑

2015年12月15日

187. Repeated DNA Sequences (String; Bit)

摘要: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to ... 阅读全文

posted @ 2015-12-15 10:31 joannae 阅读(196) 评论(0) 推荐(0) 编辑

2015年12月13日

C的内存泄漏检测

摘要: 一,Windows平台下的内存泄漏检测检测是否存在内存泄漏问题Windows平台下面Visual Studio 调试器和 C 运行时 (CRT) 库为我们提供了检测和识别内存泄漏的有效方法,原理大致如下:内存分配要通过CRT在运行时实现,只要在分配内存和释放内存时分别做好记录,程序结束时对比分配内存... 阅读全文

posted @ 2015-12-13 13:32 joannae 阅读(541) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 43 下一页

导航