昨天,参加了一场笔试和面试。对于我这个初入软件,想要转行的名符其实的“菜鸟”来说,打击不少,几个月的“苦读”,原以为基本知识涉猎的差不多的我,迎来了一次真正的笔试与面试。两个小时的笔试,对于我来说,内容有些难度,涉及到一些数据结构的知识,也让只会看书,疏于“上机”的我感到一片茫然。毕竟,理念到...
分类:
系统相关 时间:
2014-07-07 12:52:45
阅读次数:
288
记得去年9月28日赶到交大去听july的算法面试讲座,他给我们出的第一个题目就是用代码实现atoi,限时10mins。由于当时很久没接触编程,当堂没写出来。记得当时讲解的时候就是要我们特别注意边界条件。写程序就像砌围墙,得先把边界条件弄好。转眼一年过去了,再过几个月就要出去hunting job.....
分类:
编程语言 时间:
2014-07-07 10:05:41
阅读次数:
279
分析:
假如给定的数组中的元素是1-9之间的数,我们怎么来处理呢?比如[ 1,4,7,9,3,8],很简单,排个序,就是134789。
这里不同的一点就是,给定的数稍微复杂一点,不再单纯的是1位的数,[3,32,321] 这种情况也会出现。我们还想用排序,那么就需要自己制定下排序规则,也就是比较的标准。
str1和str2 长度相同的比较就不说了,在长度不同的时候,我们将长度短的用最后一位进...
分类:
其他好文 时间:
2014-07-02 11:47:35
阅读次数:
209
它的特点是:极小、数据库、性能不错。
适合场景:小型应用软件,解决存文件的不便...
分类:
数据库 时间:
2014-07-02 09:44:29
阅读次数:
194
【题目】
Sort a linked list in O(n log n) time using constant space complexity.
【题意】
排序一个链表,要求时间复杂度O(nlogn),使用常量空间
【思路】
nlogn的复杂度,用归并排序求解...
分类:
其他好文 时间:
2014-07-02 09:25:40
阅读次数:
252
【题目】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
click to show clarification.
Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word....
分类:
其他好文 时间:
2014-07-02 08:34:34
阅读次数:
170
【题目】
Sort a linked list using insertion sort.
【题意】
用插入排序方法排序链表
【思路】
直接搞...
分类:
其他好文 时间:
2014-07-02 08:33:49
阅读次数:
200
【题目】
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /. Each operand may be an integer or another expression.
Some examples:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/...
分类:
其他好文 时间:
2014-07-02 07:43:36
阅读次数:
212
【题目】
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
【题意】
给定一堆点,要求找出一条之前上的最大点数
【思路】
没什么好的方法,从每个点P出发,遍历所有的情况
从每个点P出发,斜率相同的点即为统一之前上的点
注意两种特殊情况:
1. 两个点重合(即为同一个点)
...
分类:
其他好文 时间:
2014-07-02 06:52:06
阅读次数:
171