Snapchat面经 - ┅☆心随风飞 - 博客频道 - CSDN.NET



Snapchat面经 - ┅☆心随风飞 - 博客频道 - CSDN.NET

电面的时候是用Google Hangout,需要视频,两个男的在那视频感觉怪怪的。题目是给一个整数数组,其中所有数字都大于等于1。这些数字可以用加号,乘号和括号连接成一个表达式,求表达式的最大值。二维DP搞定。

Follow up是考虑0和负数。这时需要维护两个DP表,同时跟踪表达式的最大值和最小值。在当今这个DP已经不流行的年代,这个题目算是我所有面试见到的最难DP题目了。


Onsite一共4轮,里面有一个中国人,一个ABC,两个白人。中午一个senior level的国女陪着吃饭,感觉面试阵容实在太好了。

第一面是LC原题,根据前序遍历和中序遍历构造二叉树,follow up是检测非法输出。以前没想过follow up,原来还挺有意思的。

第二面有两题。第一题是Amicable pair,我只给出了O(N*sqrt(N))的暴力解法,不过小白还是很满意的,他说这已经是他所知的最好解法了。第二题是实现字典树,也不难。

第三面是实现Bipartite。虽然图论方面的知识已经基本都忘了,白人经理很耐心的引导我,排除了我一些错误的想法(例如想边BFS边回溯),然后自己debug了一下,主要的test case都过了。不过由于debug花了些时间,没有follow up。估计要挂就挂在这一轮了。

第四面是实现BigInteger类,主要实现BigInteger之间的加法。由于正负数都要考虑,其实这里也要实现求相反数和减法。思路不难,但是代码还挺多的,test case也挺多的,不过都测对了。


Read full article from Snapchat面经 - ┅☆心随风飞 - 博客频道 - CSDN.NET


No comments:

Post a Comment

Labels

Algorithm (219) Lucene (130) LeetCode (97) Database (36) Data Structure (33) text mining (28) Solr (27) java (27) Mathematical Algorithm (26) Difficult Algorithm (25) Logic Thinking (23) Puzzles (23) Bit Algorithms (22) Math (21) List (20) Dynamic Programming (19) Linux (19) Tree (18) Machine Learning (15) EPI (11) Queue (11) Smart Algorithm (11) Operating System (9) Java Basic (8) Recursive Algorithm (8) Stack (8) Eclipse (7) Scala (7) Tika (7) J2EE (6) Monitoring (6) Trie (6) Concurrency (5) Geometry Algorithm (5) Greedy Algorithm (5) Mahout (5) MySQL (5) xpost (5) C (4) Interview (4) Vi (4) regular expression (4) to-do (4) C++ (3) Chrome (3) Divide and Conquer (3) Graph Algorithm (3) Permutation (3) Powershell (3) Random (3) Segment Tree (3) UIMA (3) Union-Find (3) Video (3) Virtualization (3) Windows (3) XML (3) Advanced Data Structure (2) Android (2) Bash (2) Classic Algorithm (2) Debugging (2) Design Pattern (2) Google (2) Hadoop (2) Java Collections (2) Markov Chains (2) Probabilities (2) Shell (2) Site (2) Web Development (2) Workplace (2) angularjs (2) .Net (1) Amazon Interview (1) Android Studio (1) Array (1) Boilerpipe (1) Book Notes (1) ChromeOS (1) Chromebook (1) Codility (1) Desgin (1) Design (1) Divide and Conqure (1) GAE (1) Google Interview (1) Great Stuff (1) Hash (1) High Tech Companies (1) Improving (1) LifeTips (1) Maven (1) Network (1) Performance (1) Programming (1) Resources (1) Sampling (1) Sed (1) Smart Thinking (1) Sort (1) Spark (1) Stanford NLP (1) System Design (1) Trove (1) VIP (1) tools (1)

Popular Posts