VMWare 新鲜OA

选择题6道,都是常见的选择题,这个没什么说的。着重要说,它们家 的code!
一共3道题,C++开发环境,我基本上它们家常见code我都用c++写了一遍。
写在前面,仅供大家参考,vm用的hackerrank平台是带cheating code detect的。

  1. anagram
    因为第一次用hackerrank,他们的输出有点不习惯,面经只说了用hash就行,但是重点在于最后要有序输出,所以拿到答案后还要sort一遍才行!这是从来没人说的
  2. 捡垃圾,要求不大于3,slidewindow解法。
    这个题就是左右指针,没啥说的,也没什么坑,很快就写完了。
  3. climb the hill!
    这个hill题我看了网上所有的答案,然后oa时我写完后发现准备的答案不对!只能过部分的testcase,不过我冷静的分析一下,还是pass过了。
    网上python的那个答案和JAVA版本的答案都不对。
    python答案不对在于没有判断不用reverse的情况!
    JAVA答案错误在于所有return 是long,但是java开的是int空间,最后答案一定超int范围了,所以dp一定要开long空间,所以testcase只能过一部分

六道选择题区里总结得差不多了,也都找得到答案,这里就不说了。
一道email thread,一道maximal square,最后一道efficient janitor minimal trip,网上找不到原题,且不像区里说有次数限制。

大题分别是
build sequence
fun with anagrams
Maximal Square
有点过于ez
白费我半天功夫准备
climb the mountain
email thread

6个选择:

  1. find the inorder array with postorder and preorder arrays
  2. telephone: graph
  3. Best data structure to manipulate a string with inserting, deleting: Linked list
  4. circular linked list: 0 additional pointer
  5. try, catch, final: final
  6. time complexity of a recursion algo with sqrt inside: loglog(n)

3个coding:

  1. code friends: E=1, M=3, H=5
  2. group anagram
  3. climb the hill

时间线:

我的时间线非常扯 8/14 海投,中间跟HR又过几次邮件填问卷。周到OA是20+天之后了……