close

2016(1-3月) 


电面一轮
* reverse linked list.鏈枃鍘熷垱鑷�1point3acres璁哄潧
* implement circular array

Onsite 四轮
Round 1:
* group anagram
* phone number combination. 涓€浜�-涓夊垎-鍦帮紝鐙鍙戝竷

Round 2:
* check big/small endian. 鍥磋鎴戜滑@1point 3 acres
* move zero to right
* sparse vector storage and product

Round 3: Design post search

Round 4: research. 涓€浜�-涓夊垎-鍦帮紝鐙鍙戝竷


2016(7-9月) 

. 1point3acres.com/bbs
Given a tree, find the smallest subtree that contains all of the tree's deepest nodes..1point3acres缃�
                  a
               /  |  \
             b   c   d
           /   \       |
         e      f      g
       /       /  \
      h      i     j
depth of tree: 4. more info on 1point3acres.com
deepest nodes:[h,i,j]
least common ancestor of [h,i,j]: b
return: b

我问面试官这个树的定义呢,我要不要写一写,面试官说不用了,你就随意写吧,我可以【猜】啊!
我就找到leetcode上面哪个lowest common ancestor of binary tree,一通瞎改了改改成了多叉树版本的,这时候我是直接使用了 h,i,j 这几个节点假设是输入的。
然后面试官一直沉默,我说,我觉得这能跑通(我其实一点都不觉得),面试官说哦那你这几个点是什么鬼,我说咦这不是输入么?哦这不是输入啊!那我再写个BFS先找到最深的点吧,然后又写了个BFS,全程面试官不说话,就看着我一个人干着急,然后,时间竟飞也似的到了40分钟,我就跟面试官说,这个您还在么,面试官说我看着呢,我说要不我给您讲讲我这个代码的意思?面试官说好啊,我就讲讲讲(我也不知道对不对),面试官听完说cool,我心想cool毛啊一点都不cool啊,我这写的都是什么乱泥。
然后面试官说那你讲讲时间复杂度,我说BFS肯定是O(n),下面用了递归,每个节点访问一遍,也是O(n),所以总的就是O(n) 咯(其实我根本不知道是不是),面试官说行吧make sense,来问我问题吧...


 

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 g0d2 的頭像
    g0d2

    kazi1@的部落格

    g0d2 發表在 痞客邦 留言(0) 人氣()