
CodeInterview
文章平均质量分 72
Feewill
这个作者很懒,什么都没留下…
展开
-
每天坚持Crack Code(Day 1)
打好基本功:Data StructuresAlgorithmsConceptsLinked Lists Breadth First SearchBit ManipulationBinary TreesDepth First SearchSingleton Design PatternTriesBinary Sear原创 2013-09-17 15:28:14 · 1054 阅读 · 0 评论 -
每天坚持Crack Code(Day 2)
Chapter 1 | Arrays and Strings问题1.4 Write a method to decide if two strings are anagrams or not.翻译:写一个方法判断两个字符串是否是anagrams。所谓Anagrams指的是具有如下特性的两个单词:在这两个单词当中,每一个英文字母(不区分大小写)所出现的次数都是相同的,只是位置不同,例如:原创 2013-09-19 23:53:31 · 1200 阅读 · 0 评论 -
每天坚持Crack Code(Day 3)
问题:1.6 Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to rotate the image by 90 degrees. Can you do this in place?翻译:一张图像NxN矩阵,每个像素为4个字节,写一个方原创 2013-09-20 10:17:51 · 850 阅读 · 0 评论 -
每天坚持Crack Code(Day 5)
第九章排序和查找基本算法如下:Bubble Sort:Start at the beginning of an array and swap the first two elements if the first is bigger than the second. Go to the next pair, etc, continuously making sweeps of the ar原创 2013-09-22 23:26:00 · 957 阅读 · 0 评论 -
每天坚持Crack Code(Day 4)
今天头脑涨涨的,所以看书都不想从头往后看,索性挑了一章看~首先是了解一下概念问题:C++ vs Java1.Java runs in a virtual machine. 在虚拟机中运行2. C++ natively supports unsigned arithmetic.支持原生的无符号数学运算3. In Java, parameters are always passed原创 2013-09-22 23:04:02 · 1018 阅读 · 0 评论 -
每天坚持Crack Code(Day 6)
二分查找算法或折半查找法(迭代和递归实现)/* 二分查找算法或折半查找法(迭代和递归实现)*/int BinarySearch(int arr[], int N, int value){ int low = 0; int high = N - 1; while (low <= high) { int middle = (low +原创 2013-10-09 22:03:26 · 726 阅读 · 0 评论