Vulkan

上一页 1 2 3 4 5 6 7 8 9 10 ··· 27 下一页

2014年4月28日

Cracking The Coding Interview 9.3

摘要: //Given a sorted array of n integers that has been rotated an unknown number of times, give an O(log n) algorithm that finds an element in the array. ... 阅读全文

posted @ 2014-04-28 10:45 Vulkan 阅读(125) 评论(0) 推荐(0) 编辑

2014年4月23日

Cracking The Coding Interview

摘要: //原文://// Write a method to sort an array of strings so that all the anagrams are next to each other.// 译文:// 写一个函数对字符串数组排序,使得所有的变位词都相邻。//参考@hawstein#... 阅读全文

posted @ 2014-04-23 14:40 Vulkan 阅读(152) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview 9.1

摘要: //原文://// You are given two sorted arrays, A and B, and A has a large enough buffer at the end to hold B. Write a method to merge B into A in sorted o... 阅读全文

posted @ 2014-04-23 13:50 Vulkan 阅读(87) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview 9.0

摘要: #include #include using namespace std;void mswap(int &a, int &b){ int c = a; a = b; b = c;}void print(int *a, int size){ for (int i = 0; i a[i+1]) {... 阅读全文

posted @ 2014-04-23 13:24 Vulkan 阅读(132) 评论(0) 推荐(0) 编辑

2014年4月18日

Cracking The Coding Interview 5.7

摘要: //An array A[1…n] contains all the integers from 0 to n except for one number which is missing. In this problem, //we cannot access an entire integer ... 阅读全文

posted @ 2014-04-18 14:30 Vulkan 阅读(136) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview 5.6

摘要: //Write a program to swap odd and even bits in an integer with as few instructions as possible (e.g., bit 0 and bit 1 are swapped, bit 2 and bit 3 are... 阅读全文

posted @ 2014-04-18 12:59 Vulkan 阅读(150) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview 5.5

摘要: #include #include using namespace std;int getNum1(int N){ int num=0; for (int i=0; i>1; } return num;}void print(int p) { vector v; for (int k = 0;k>... 阅读全文

posted @ 2014-04-18 12:12 Vulkan 阅读(111) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview5.3 暂存

摘要: 的 阅读全文

posted @ 2014-04-18 12:12 Vulkan 阅读(82) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview5.2

摘要: //Given a (decimal - e.g. 3.72) number that is passed in as a string, print the binary representation.If the number can not be represented accurately ... 阅读全文

posted @ 2014-04-18 01:48 Vulkan 阅读(92) 评论(0) 推荐(0) 编辑

Cracking The Coding Interview5.1

摘要: //You are given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e.g., M b... 阅读全文

posted @ 2014-04-18 01:17 Vulkan 阅读(149) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 27 下一页

导航