终于等到offers

在历经7个月找工作的艰苦历程之后,我终于在美利坚拿到offers了。一个是M5 Networks,一个是Microstrategy,总金额同为85k年薪,因为后者的名气和地理位置,我打算从了后者,不过还需要背景调查。

以前以为EE也就比CS难找工作一点,现在才感慨,原来那是基于很多EE去找CS的工作,而且会付出比别人多的努力。EE的学生虽然也写代码,但是因为没有算法和数据结构的知识,写出的代码质量真的不高,而且要过面试那就更难了。

先说我找工作的经历吧。我是从3月开始准备面试,当时金磊同学告诉我大公司都在招人,然后让我看看careercup和版面总结也去投,他拿了很多面试(大部分都成offer了)。我看这些题真是个吃力啊,因为我对于数据结构,算法,设计模式的基础基本为0,虽然以前写了很多代码,最多也就是UI设计了。不过看看总结也不是特别长,就把那些帖子都翻出来慢慢看,看不明白就去查资料,或者就直接骚扰我同学了。后来发现这些算法也就那会事,看多了就会了。但是会用不一定会写,经常写出来的代码到处是错,从来不会没编译错误的。在看完一次版面总结后,又开始看第二次,并且再写了一次代码。接着在这个版面混了,有人发了面经就把题认真想,然后写代码。我觉得讨论是个好东西,自己想到办法不一定是对的。

复习到8月份开始投简历,对于大公司我是一个一个投,不想有重叠,5个招人挺多的公司,至今还有微软,facebook没面。其实我觉得学习到现在,对算法,编程兴趣都有热爱的心了,每天不看看面经不写写代码还觉得不习惯….

简历篇
需要除了基本语法,突出关键点,需要说的是地址,如果你距离纽约近,就随便找个纽约地址写,我就是写我朋友的地址,经常都有猎头找我。如果你是距离加州近,就写加州。如果都不近,我建议毕业了就2选一先找个便宜的地方住吧。
列出的qualification一定一定是你非常有把握的,不怕少,就怕虚!我在面google的
时候就吃了这个亏,我简历写了多线程,TCP/IP,结果面试官就给我一段TCP/IP的代码,让我找错,而错误又不是语法,而是经验问题。
列出的projects一定一定要熟悉,不一定是你做的,但是你一定一定要把为什么这么设
计非常清楚。
有朋友问fresh哪里有那么多project经验,我觉得对于master有3个就够了,如果不够
怎么办?拿来主义!找同学要project的summary,主要看为啥做这个,怎么做的,为什么这么做,而不用其他办法,代码看个结构。考官喜欢问你为什么这么做,难点是什么,解决方案。

面试准备篇
不打没把握的仗
如果你觉得mitbbs版面总结还有10%以上题不会或者写代码会有错,我不建议去浪费面试机会。
版面总结链接 http://www.mitbbs.com/article/JobHunting/31505215_4.html
如果要准备除了google facebook Microsoft其他公司c++的软件工程师,我个人认为需要看到
几个材料有
1. mitbbs版面总结
2. careercup 150题
3. effective c++
4. 面向对象设计的例子,设计模式至少会3个,懂得这3个用在哪里,能举例子。
5. 多线程同步相关知识
http://www.advancedlinuxprogramming.com/alp-folder
6. stl一定要知道大概每一个是怎么实现的,数据结构是什么,复杂度,什么时候用哪个

对于面很大的公司,需要有针对性准备,比如bloomberg,就要把online test的题搜集起来看,在careercup里面有人总结了的。比如google,Microsoft,facebook,Amazon,需要看海量数据处理,还需要看一些难题,这个需要经常看别人怎么解题的,多做题,多思考,思路就广阔了。
还有就是写代码的熟练度问题,常见题应该都要求自己写代码一次写对。对于比较难得,至少不能有语法错误吧。不是每个公司都要求你写代码这么牛,关键是你练充分了,去面试就不怕别人让你写了,心态就不一样了。

不要认为准备的东西太多就被吓着了,以前我觉得那个贴面google的准备材料那个帖子,很恐怖,后来自己还真把里面的东西都准备了,觉得也不可怕,再说了红宝书都背了,还怕这些?红宝那么枯燥。你可以把自己写的代码都保留下来,虽然经常会重复写,但是你会发现你每次写都会有进步,代码越来越简洁,bug越来越少,而且你会从一个题的解法联想到其他题的解法。

面试不怕失败,失败是成功之母,这句话对也不对。如果你没怎么准备就去了,失败了,那就不是成功之母,那就是浪费机会!机会真的不多,能大量招人的大公司就10多个,其他小公司基本找local。我4月浪费掉bloomberg的机会,让我后悔了很久,因为除了online test,其他面试都不难。于是我苦心练了4个月,然后才开始投amazon,结果又因为系统设计不熟悉,hashtable的设计问题被灭了。
当准备充分后,就可以大量投简历了,面试经常都是recruiter联系后就没回信了,不过不需要难过,因为这种电话其实也挺练习口语的。投简历一定要找他们家要求和自己
qualification 对口的投,不然真的是浪费时间。一周可以集中周2-周3投10-20个简历。如果猎头有contract的工作找你,你最好也别错过了,至少可以练口语,练心态。我面到现在,觉得口语已经有很大突破了,面试官居然夸我口语好。。。。。。其实就是说的太多了,能不好么?

面试经验篇
面试前一定要对公司的产品有很详细了解。
面试一定要有热情,一定要有轻松的心态,从容自若,如有机会可以给面试官开玩笑。比如考官问我自动toll的设计,我就跟他说我最讨厌toll,每次过比吃t。考官喜欢跟幽默的人做同事。
穿着我觉得西裤,衬衣,皮鞋就行了,表示对面试的重视,对面试官的尊重。
找reference也很关键,最好找口语好的同学。找老师就找一个,最信得过的,不一定是advisor。

发表在 未分类 | 1条评论

准备interview+看NBA

  很久不写blog了,主要是因为转用linux系统之后,都找不到blog的入口,真是悲哀啊。
  最近在潜心专研算法,数据结构这些,打算去大公司碰碰运气。
  昨天在mitbbs看到一个兄弟准备面试的材料,让我大吃一惊,感觉自己还需要下大功夫才能拿到offer啊。不过拿offer除了下功夫,也要有运气。信著姐,拿offer。
  下面是别人准备的清单,绝对不亚于GRE的难度。
  再说NBA,昨天看了下骑士对凯子,我不是james密,但是我觉得除了骑士,其他队根本没法和湖人对抗。不过骑士又让我失望了,特别是JAMES的智商和情商真的不怎么样。遇到困难就不知道怎么办了,而主教练更是煞笔,你怎么换的人啊,就知道冒冷汗…..骑士的阵容,有3都是攻强守弱的球员,除了JAMES和parker。但是凯儿特人刚好有4个人进攻好,无论这2个人怎么防,球队到处是漏洞。特别是莫威,你防守差得可以进CBA了…..人见人爆。这个阵容除了打湖人,对其他强队基本都是被灭。因为湖人的控球后卫防守进攻也不行,而Parker和Moon又克制可鄙,奥尼儿克制拜那木,最多Jamison被Gasol互爆。个人防守差不可怕,就怕被别人无限利用…..凯儿特人球员篮球智商真是高!下场比赛,如果继续重用莫威,这比赛基本就没什么可看的了,骑士就等收尸吧。

Interview Qs

Data Structures

   1. Integer
      – find number of 1s
      – next largest smaller
      – smallest larger number
      – determine if is palindrom
      – itoa, atoi
      – add 2 numbers w/o using + or arithmetic operators
      – implement *, -, / using only +
      – find max of two numbers w/o comparison
      – swap two numbers with +/-
      – swap two numbers with ^
      – given an integer, find the closest number that is palindrome
      – implement putlong() by putchar()
   2. Bit array
   3. Linked list
      – find cycle,
      – find position of cycle starts
      – reverse LL
      – delete a node in middle
      – each node contains a value pointer pointing to a node,
        duplicate LL.
      – remove duplicates from sorted/un-sorted LL.
      – find n-th to last node to end
      – number is represented by LL, add 2 numbers
   4. Array
      – Longest common substring (LCSubstr)
      – Longest common subsequence (LCS).
      – Longest increasing subsequence (LIS).
      – Longest palingdrome in string.
      – array, elements are +/-, find subsequence of max sum
      – circular array, elements are +/-, find subsequence of max sum
      – find all pairs of integers add up to a sum
      – find all pairs of integers add up to a sum,
        integers are +/- and sorted
      – find one missing number in N numbers in range [0, N]
      – find two missing number in N numbers in range [0, N].
      – binary search circular array
      – Given {a1, a2, a3, ..}, {b1, b2, b3, …},
        get {a1, b1, a2, b2, …}
      – Given 2 arrays A and B, A large enough to hold both,
        merge B into A.
   5. String
      – KMP, Rabin-Karp, Boyer Moore
      – reverse string
      – reverse words in string 
      – strcpy, strcmp, strstr, atoi, itoa, strdup
      – remove duplicate characters in O(1) space
      – Given dictionary, transform one word to another of same length.
      – Given large text, find min cover distance of n words.
      – find longest word made of other words
      – find first non-repeated char
      – remove specified char from a string
   6. Matrix
      – matrix elements are +/-, find submatrix of max sum
      – rotate a matrix by 90 degrees
      – each cell is black/white, find max subsquare with black border.
      – binary matrix, find largest square matrix with 1s
      – binary matrix, find largest rectangle matrix with 1s
   7. Stack
      – implement stack by queue.
      – augmented stack with O(1) push, pop, min
      – use single array to implement 3 stacks
      – sort a stack in ascending order using only
        push/pop/top/isEmpty/isFull
   8. Queue
      – implement queue by 2 stacks
   9. Priority Queue
  10. Heap
      – create heap on array
  11. Young Tableau
      – find element
      – get k-th element
  12. BST
      – pre/in/post-order traversal, recursive and iterative
      – pre/in/post-order traversal, recursive and iterative,
        with parent pointer
      – find height
      – determine IsBST
      – find "next" node of a given node in inorder sequence
      – find k-th inorder element
      – find range of elements
      – find diameter
      – find all path adding to a sum
      – Check if a tree is balanced
      – Convert sorted array into balanced BST
      – Find first common ancestor of two nodes in a BT or BST
      – Link each node to its right sibling
      – Print by level (BFS)
      – Print by level (BFS) in reverse order
      – Determine if 2 BSTs have the same structure
      – Create a mirror BT of a BT
      – Replicate a linked structure
  13. 2-3-4 Tree
  14. Red-Black Tree
  15. Splay Tree
  16. AVL Tree
  17. Trie
  18. Suffix Array
  19. Suffix Tree 
      – LCSubstr (longest common substring)
      – Longest repeated substring
      – longest palindrome
      – substring search
      – data compression
  20. B-Tree
  21. KD Tree
  22. Range Tree
  23. Hash Table
  24. Bloom filter
  25. Disjoint set
  26. Graph
      – DFS, BFS
      – find path existence between two nodes
      – Min vertice set covering all edges
      – shortest path
      – minimum spanning tree
      – min edge coverage by vertex

Sorting

   1. Bubble sort
   2. Insertion sort
   3. Selection sort
   4. Shell sort
   5. Heap sort
   6. Quick sort
   7. Merge sort
   8. N-way merge sort (external sort)
   9. Counting sort
  10. Bucket sort

Search

   1. Linear search
   2. Binary search
      – Binary search, iterative/recursive
      – find missing number is sorted array
      – search in circular sorted array
   3. Quick Select

Dynamic programming

   1. BST
   2. COV
   3. ILP
   4. KS
   5. LCS
   6. LSP
   7. MCM
   8. ODP
   9. SCP
  10. SPA
  11. SPC
  12. TSP
  13. Given array a[], when i < j, get max(a[i] – a[j]).
  14. levenshtein edit distance
  15. Coin Change problem.

Large-scale system

   1. Bloom filter
   2. Bit-array/bit-map
   3. Heap
   4. Hash table
      – d-left hashing
   5. Sub-division
   6. Database indexing
   7. Inverted index
   8. External sort
   9. Map-reduce

Discrete math, Probability and Statistics, Numerical Computation

   1. Permutation
      – 3 colors, how many ways to color a cube?
      – robot, ways to go to diagonal corner on NxN matrix?
      – print all combinations of valid n-pairs of parentheses
      – print all subsets of a set
   2. Combination
   3. Sampling
   4. Random number generator
      – What’s a good random number generator?
      – Given random generator [1, 2, 3, 4, 5],
        generate random in [1..7].
   5. Reservoir sampling
   6. Find median in stream
   7. Card shuffling
   8. Primality testing
   9. Find prime numbers: naive, sieve of Eratosthenes, sieve of Atkin
  10. Randomized primality testing, what’s good random generator
  11. Fibonacci sequence
  12. Factorial numbers
  13. Frobenous numbers
  14. Newton-Ralphson algorithm
  15. Bayes theorem

Computational algebra

   1. Convex-hull
   2. Closest pairs

Computational theory

   1. Automata theory
   2. DFA
   3. NFA
   4. Regular language
   5. Pumping lemma
   6. Turing machine
   7. NP-completeness
         1. TSP
         2. Vertex-cover problem
         3. Set-covering problem.
         4. Subset-sum problem.

OS

   1. Process and thread
   2. Semaphore, mutex, monitor
   3. Function call/call frame
   4. Context switch
   5. Multi-threading
   6. Multi-process
   7. Thread safety
   8. Big/Little-endian
   9. Heap/stack
  10. Malloc/free
  11. Virtual memory, page fault, thrashing
  12. DMA (Direct Memory Access)

Networking

   1. 7-layer OSI model
   2. 4-layer TCP/UDP model
   3. TCP/UDP
   4. TCP 3-way handshake (ACK machanism),
      flow control, congestion control
   5. Things happen after entering url
   6. Routing protocols: BGP, OSPF, RIP
   7. Subnet mask, packet routing on same/different network.
   8. Performance

Database

   1. Normalization
   2. External sorting
   3. B-tree, B+-tree.
   4. Relational algebra

Compiler

   1. LL, SLR, LALR, LR, GLR
   2. recursive precedence
   3. Operator precedence
   4. Postfix evaluation of arithmetic expression
      – implement a calculator

C/C++/Java

   1. const char *, char * const, const char * const
   2. static
   3. volatile
   4. explicit
   5. Object/class
   6. Inheritance
   7. Encapsulation
   8. Polymorphism
   9. operator overloading
  10. Composition/inheritance
  11. Interface, abstract class
  12. Struct/class
  13. 4 default methods of a C++ struct/class
  14. deep copy/shallow copy
  15. C++ name hiding
  16. C++ smart pointer
  17. friend function/class
  18. Multiple inheritance
  19. Virtual inheritance
  20. Constructor
  21. Copy/assignment constructor
  22. Virtual destructor
  23. Virtual function, vtable
  24. Pure virtual function
  25. Macro, typedef, inline
  26. C, C++, Java comparison
  27. Garbage collection
  28. Dangling pointer, free null pointer, memory leak
  29. New/Delete
  30. Malloc/free/realloc/calloc
  31. Lock
  32. Dead lock’s four conditions
  33. #pragma directive
  34. Exception handling
  35. try/catch/finally
  36. final, finally, finalize
  37. Java object reflection
  38. C++ templates, java generics
  39. Effect of keeping constructor private
  40. Pass by Value, reference, pointer
  41. Reference v.s. pointer
  42. In-memory file system data structures and algorithms?
  43. Implement singleton
  44. Implement singleton w/o static/global variable
  45. Thread programming possible problems
  46. sizeof operator.
  47. Java: vector v.s. ArrayList
  48. int (a*)[10]
  49. Implement a lock.
  50. Implement a buffer for DataOutputStream.
  51. awk, tr, uniq, grep

Other problems

   1. 2 eggs, 100 floors, find floor that breaks egg
      minimizing number of drops.
   2. 5 quart jug and 3 quart jug, measure 4 quarts of water.
   3. 100 lockers, open every other i-th locker (i = 1, 2, …, 100).
      Final open?
   4. Men on island, can see hat on others only. N men, C hats,
      days to remove?
   5. 8/12 balls, find the one lighter/heavier
   6. 8/12 balls, find one weighs different
   7. 2 fuses each burns in 1 hour, measure 45 minutes
   8. Bridge crossing, 1, 2, 5, 10. Minual number to pass bridge
   9. Orange, apple, orange and apple, all labeled wrong. Find out.
  10. 3 light switches, only one can be on at a time. Find it out.
  11. Find the biggest, 2 biggest, biggest & smallest
  12. n*m*k cube, how many are on the surface?
  13. Test a pen, ATM machine, webpage, vending machine, program crash?
  14. Given phone #, print all word representations on phone pad.
  15. Find overlap of rectangles
  16. Find median of two sorted arrays.
  17. N computers each hold N numbers. Find median of these N*N numbers.
  18. Recontruct a BT from pre/in/post-order traversal
  19. Recontruct a BST from pre/in/post-order traversal
  20. Find longest prefix common to all strings
  21. Implement LRU cache system, O(1) find and update
  22. Shifted sorted array, rotate.
  23. Histogram, find max internal rectangle.
  24. Tournament problem
  25. N people, 1 celebrity, find celebrity in O(n) time.
  26. 4 jars, 1 polluted so pills weigh +1, find out which jar
  27. 25 horses, 5 horses maximal each match. Find the fastest 3
  28. Mirror, why left/right reversed, not up/down?
  29. How is next_permutation() in STL implemented?
  30. N line segments on number axis, calculate common coverage
  31. wild card match on patterns * (0-n) and ? (1).
  32. Find number of trailing zeros in n!
  33. Print square matrix in a spiral inwardly.
  34. Find one’s phone number given resume only
  35. N stairs, each time can go up 1 or 2. How many ways to go up?
  36. Find majority element in an array.
  37. Two cubes as a calendar
  38. Coin change problem
  39. Josephus Circle, last survivor?
  40. Pick marbles, strategy to win?
  41. Get sequence 1, 11, 21, 1211, …
  42. C program that prints itself
  43. Print week given date
  44. enter code, allow one miss
  45. Check equality of two number sets

发表在 未分类 | 8条评论

暴笑的paper,太有才了

  今天在网上搜了几篇paper看,没想到看到一篇非常有才的paper。这审查paper的人也太水了吧。

发表在 未分类 | 2条评论

终于有车了

    在美国买二手车真是个纠结的事情,如在私人那里买,好的deal都在抢,做mechanic check的时间都没有,差点的deal又觉得贵。在dealer那里买呢,看着那dealer猥琐的笑容,写满了奸诈,你就没心思买车了。我同学们陪着我开了几十mile看车,除了觉得dealer奸诈,就一无所获。终于我遇到好人了,一个从来没买卖过二手车的美国兄弟放了一个非常好的deal在网上(01年accord,才开了5.5w迈),被我第一时间看到,并且第一时间就约他看车,因为这个deal实在好,我都不敢相信我能买得到。第二天因为是G20到了,看来大家都没买车的心思,mechanic也相当闲,一下就约到一个口碑好的mech对这车进行了全面的车检。车检结果出来后我恨不得马上就去付钱,不过好事多磨,淋雨坐了2个小时公交车办了state id,第三天才把车买到手,并且麻烦了n个同学才帮我把车开回家。
    终于有车了,刚开始开车还很紧张,毕竟2年没开了,不过昨天开着车逛了圈,胆子迅速变大。第一次开这么高档的车,兴奋啊,想当年开过最好的就是桑塔纳了……
    下周就是jobfair了,尽管适合我的公司很少,希望能有点收获。
发表在 未分类 | 8条评论

休息

    麦.尹让我更新blog继续写股市的故事,因为我对股市接近顶部之后,持续人心惶惶,不敢贸然对个股或者大盘下定论,于是觉得还是不写的好。为啥我觉得大盘会跌呢,虽然有点事后诸葛亮的意思,但是从历史上看,中石化疯狂的时候,一般都是大盘休息的时候。其二,猪总警告我人民日报都刊登评论说股市虚高。其三,国家自从IPO重启,感觉就是一个饿了半年的人看到了一大桌美食,恨不得一口吃光,于是乎新股如同滔滔江水发个不断,中建这种超级大盘股就像一块大肥肉,让这个吃饭的人差点噎着,不过他还不满足啊,中冶,中国移动,这几个菜他也觊觎着。不得不惊叹,中国股市果然是国家圈钱的宝地啊。中国移动是国外圈了钱,回国继续圈。其四,就是技术上的原因了,大哥,连着涨了1000点没休息过,不累啊。当然,一旦休息起来就不是退2步就刹得住车的。国家认可3000点是合适的,那么你咋说也跌到2600点,才能刹住车的吧。当然到底跌到多少点我也不能肯定,反正筑个双底那是一定的。
    美国股市是个股涨跌翻天覆地,中国是大盘涨跌翻天覆地。
    回到主题,股市不是需要每天炒的,也不是每个月炒的,甚至不是每年炒,学会休息才是赚钱之道。
发表在 未分类 | 3条评论

Erie Lake一日游+狂吃樱桃

    昨天跟着华人教会的组织去五大湖之一的伊犁湖BBQ,顺路去一家樱桃农场狂摘樱桃。去美国的农家乐确实安逸,自己摘来吃是免费的,如果要带走收费也相当便宜。美国樱桃又大又紫,吃着忒爽。我这种人摘樱桃超级不敬业,边摘边吃,结果吃的比摘的还多。最后摘了一小筐,跑到湖边看海的过程中也吃光了,最后撑着肚子去BBQ。
    不过,华人教会的人也太没BBQ经验了,买了一大堆材料,居然生火都有问题。几个打火器都用不了,我怀疑都是MD in China的,还不如老外一个打火机好使呢。他们几个人生火,没买干柴,确买了n多碳,报纸也没几张,最后用光了一大瓶煤油,也没把碳点着。幸好有人带了一个有燃料的炉子,可以烤热狗肠,不过烤的人不专业啊,不但没带食用油,而且烤的时候也没切一切热狗,结果第一批热狗都是外面皮都烤糊了,里面还是冷冷的。于是我把每个热狗都花了n刀,烤肠里面的油顿时就流了出来,吃着真香。
    水足饭饱,教会的组长安排活动。不过活动是一个接着一个,也一个比一个弱智。杀过一轮杀人游戏后,接下来就开始儿童化,最后居然开始集体唱国语圣歌,并且跳舞……
    这些活动明显不适合我的,于是我穿着一条长腿内裤就跑到沙滩去游泳去了。还是美国人会玩啊,在沙滩上烧烤。一大堆中国人居然跑了100多公里来唱儿歌跳儿童舞蹈……..
    总之觉得华人教会特古怪,总觉得和李大师这类人扯得上什么关系一样,以后还是不去参加他们的活动了。

发表在 未分类 | 4条评论

研究大非之间的故事

     众所周知,百大集团是银泰系旗下的股票,前些日子银泰系放出消息,控股未果,不玩了,要减持,让它的竞争对手西子电梯去玩吧。对于股民来说,这看似就是利空,因为银泰离开以为着庄家撤退。于是无论大盘怎么涨,这股票就如死水也不涨。我爸熬不住了,10000股赚了几个点就走人,结果最近连续拉升。
     来看看报道原文吧,很有意思的:
【最新公司报道】
【2009-06-01】银泰减持百大集团(600865) 西子悄无声息
  本报讯 曾咄咄逼人谋求百大集团(600865)控股权的银泰系,已萌生退意。百大集团今日公告,银泰系减持4.66%股权。对于此次银泰系的减持,曾经的老对手西子联合没有任何表示。银泰系在4月份减持720万股,5月减持1031.57万股,减持价格在每股6元至7.33元之间。
     居然还有主观词汇,凭什么说有退意,为什么西子联合不表示呢?看看持股结构。
限售股份   |1 |西子联合控股|11261.83|2011-05-14         29%
                2    杭州银泰    | 2206.37|2009-05-14|         6%
流通股        1    浙江银泰百货有限公司    |  7070.00|   19%
                2    西子联合                                 1880         5%
      好家伙,2个大非一个是总股本老大,一个是流通股老大。流通股老大不做了,送给总股本老大玩。 五月减持1000w股,而股价在期间既不涨也不跌。既然它都卖了那么多,谁在抬高股价呢?一定是西子联合了。但是西子联合抬高了不是送钱给银泰么,因为银泰还有6000w股在手里呢。我认为它们是借着百大转让,联合拉高股价,大非大非联合了!2个大非占有总股本60%的股份,是多么可怕的事!银泰连续低价减持,给了西子低位吸筹的机会。看看最近上涨时期的量,不难发现机构对该股的控盘已经非常到位,不显山露水,不天亮天价,庄家要的是长线。为啥?西子控股的29%的限售要2011年才能卖呢。
     看来大非不可怕,真是事实!回国寒假旅游钱就靠这丫了。
 

 
发表在 未分类 | 2条评论