- 博客(79)
- 资源 (19)
- 收藏
- 关注
转载 硅谷跳槽工具箱指南
转自http://zhuanlan.zhihu.com/donglaoshi/19953744这是我在硅谷找工作用到的一些资料和网站,虽然都是英文的,但都是一些干货,大家都可以借鉴一下,里面有很多有意思的观点和最新动态。并且也包括了很多跟创业相关的工具,不论你是在创业浪潮中,还是希望进入到一家快速上升的公司,抑或是难以选择一个最适合自己的Offer,这里都会有工具能帮助到你。
2015-06-19 03:56:37
1944
原创 简介Intel MIC上的分布式开发以及Offload模式下的各种限制
最近要在MIC机群上做分布式开发,发现有两种模式可以用:1) offload模式:该模式和GPGPU编程思想类似,把并行度高的代码转移到local的MIC处理器上执行,其它代码仍然在CPU上执行。MIC只负责本地计算,分布式通信必须在CPU上执行。2)symmetric模式:编译出在MIC和CPU上执行的两份二进制代码。该模式逻辑上允许MIC进行分布式通信,虽然物理上消息还是从CPU走的。
2015-03-07 03:36:16
3668
原创 Snapchat面经
Snapchat总部在LA旁边的Venice Beach,面朝大海,其实就是个旅游景点,都是游玩的气息。内部员工都觉得这个app很有前途,是美国的微信,也会成为下一个facebook。另外员工里面华人也很多,目前没什么多少印度人,估计也是跟压力比较大有关系。福利感觉不错,虽说只是startup,不过健身房也有,伙食也不错,也可以包办绿卡。公司的布局充满着文艺气息,非常符合LA的风格。虽说自己没用过
2015-02-08 03:40:46
6277
原创 Airbnb电面面经
Airbnb电面风格是要求代码写完了能够编译,然后自己写测试用例并跑过。感觉这样的好处是的确很考察代码功力,那种当场一次bug free,然后跑几个测试用例全过的感觉很爽。不好的地方是容易增加变数,因为即使自己本身水平不变,不同时候发挥略有差异,检查一两个bug用的时间可能就没机会做后面的follow up了。第一轮考察分页显示功能的实现。给了以下一些输入数据,要求将以下行分页显示,每
2015-02-08 02:22:10
12831
原创 [LeetCode] Binary Tree Upside Down的三种解法
Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it upside down and turn it into a tree where the origin
2015-01-27 04:33:47
18461
原创 San Fransisco Onsite面经
财大气粗的Dropbox不愧为dream company,每天可以报销伙食费90美元,是我面过的公司给的最高的,并且还可以额外住一天酒店并报销100刀的观光费用。HR还很贴心的列出一堆景点,以供游玩。里面的工作环境很赞,食堂不错,白人比例高,由于靠海,view也不错,可以看海边日落。需要注意的一点是,在代码写完后,不少人会拍个照,所以代码还是写工整一点比较好,这个一开始不知道,字迹潦草
2015-01-25 11:28:24
8830
转载 Facebook面试准备
以下内容转自http://www.mitbbs.com/article_t/JobHunting/32741713.html===================================================================================================================关于面试流程社招的话电面1-2
2015-01-17 04:37:26
3913
原创 [LeetCode] Largest Number
Given a list of non negative integers, arrange them such that they form the largest number.For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330.Note: The result may be ve
2015-01-14 09:35:58
5125
原创 [LeetCode] Longest Substring with At Most Two Distinct Characters及扩展
Given a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s = “eceba”,T is "ece" which its length is 3.这题的线性解法是维护一个sliding w
2015-01-06 04:24:08
9983
原创 [LeetCode] Find Peak Element
A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, in
2015-01-01 03:49:30
1416
原创 [LeetCode] Binary Search Tree Iterator
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next()
2014-12-31 23:29:34
10616
原创 [LeetCode] Fraction to Recurring Decimal
Given two integers representing the numerator and denominator of a fraction, return the fraction in string format.If the fractional part is repeating, enclose the repeating part in parentheses.
2014-12-30 20:37:05
1812
原创 GT背靠背onsite
Google:由于暑假在G家实习过,所以只是简单面了2轮。后来跟以前的intern host吃饭得知,他和另一个reviewer对我的实习工作都给了不错的评价,所以面试的时候面试官都放水了,题目出得异常简单,每题都是10行代码搞定的那种。第1轮:1. 实现一个hangman游戏,给定一个词作为答案,然后进行猜测。猜测的时候只知道这个词的长度。每次可以从26个字母里的
2014-11-20 13:17:16
2506
原创 Twitter电面面经
先过了个一个online test,然后2轮电面。Online Test挺简单的两个题,这里就不提了。 等待onsite。。。电面1:一个国人大哥面的,LeetCode上sudoku的两个题和在一起,API稍微有点变化。国人很nice,就是时间太紧了,迟到5分钟,聊天10多分钟,所以coding时间不到半个小时,DFS的时候没有时间写带pruning的更优解法了,只是简单说了说。
2014-11-11 13:38:58
3167
原创 Dropbox电面面经
他家电面有2轮,等待onsite。。。电面1:国人MM面的,这点感觉很难得。统计最近5分钟的点击量,实现hit和getHit两个函数。这题是他家高频题,我用deque实现的,hit的均摊时间是O(1),觉得应该差不多最优了吧。后来要求写个并行程序,忘记问是写共享内存的还是分布式的了,写的有点卡,有时候纠结到底用lock还是用多个local copy,感觉设计起来其实就是CAP理论的实践
2014-11-11 13:32:20
5459
原创 [LeetCode] Divide Two Integers
Divide two integers without using multiplication, division and mod operator.显然,如果光用减法太慢。让商为N,那么需要用O(N)的时间。这里要求比较苛刻,连乘法都不能使用,所以只能寄希望于二进制操作了。这里可以把除数表示为:dividend = 2^i * divisor + 2^(i-1) * divisor +
2014-11-11 01:27:13
1621
原创 [LeetCode] Longest Substring Without Repeating Characters (LinkedHashSet的妙用)
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo
2014-10-25 05:06:45
1253
原创 [LeetCode] Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in
2014-10-24 11:12:38
1177
原创 [LeetCode] Maximum Product Subarray的4种解法
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,4],the contiguous subarray [2,3] has the larges
2014-09-26 12:11:40
7035
原创 如何快速使用上C++11
最近的几个项目都是用C++11写的,越用越觉得强大,很多的新特征也希望Java能整合进去就好了。打算改天有空也写个C++11的使用心得,无奈C++太博大精深,还有好几个很赞的功能还没掌握。现在试着在本机Ubuntu上使用C++11,找了好几种方法,觉得下面这种方法最快。首先为了使用C++11,gcc版本必须在4.7以上。当然,如果不是使用C++11的所有功能,只是主要使用smart point
2014-09-25 03:00:32
2657
原创 [LeetCode] Word Ladder II
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be changed at a timeEach intermediate word must exi
2014-03-20 13:58:01
8494
原创 [LeetCode] Word Ladder
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermediate word m
2014-03-20 09:42:56
1601
原创 [LeetCode] Max Points on a Line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.这题之前想把任意两点间都练成直线,这样一共就有N * (N - 1)条直线(如果含重复的点则直线数更少)。然后把直线表示成点斜式,根据斜率和截距进行来分组计数。试了下,发现这样要么得自己实现ha
2014-03-20 08:10:23
1320
原创 [LeetCode] Valid Number
Validate if a given string is numeric.Some examples:"0" => true" 0.1 " => true"abc" => false"1 a" => false"2e10" => trueNote: It is intended for the problem statement to be ambiguo
2014-03-19 23:31:31
1653
原创 [LeetCode] Wildcard Matching
Implement wildcard pattern matching with support for '?' and '*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover t
2014-03-19 13:04:18
1586
原创 [LeetCode] Text Justification
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words in a greedy approach; that i
2014-03-19 05:04:05
2391
原创 春假扭腰Bloomberg一游
春假去了趟扭腰参观了下Bloomberg,发现总部在Mahattan这种寸土寸金的地段还挺大的,里面装修也还不错。最重要的是,放眼望去,男女比例还是不错的,比一般的IT公司还是要均衡很多,至少给我面试的人里面都是男女成对出现,虽然不知道这是不是凑巧而已。两星期前刚好有2个同学来这面试,都是面了一轮就完了,于是我在面试的前一天还约了人吃中饭,结果我去的时候居然给我面了4轮,直接从早上10点弄到下午4
2014-03-17 14:12:58
4903
原创 有趣的Google面试题 - Harry Potter走矩阵
MITBBS上看了一道有趣的G家面试题,题目如下:有一个2维矩阵,假设你是Harry Potter,在矩阵的左上角,你现在要走到右下角。矩阵中每个点都有一个权值,有正数也有负数,遇到正数表示你的生命力能增加那么多,遇到负数表示生命力减少那么多,在任何时刻如果你的生命力小于0,那么你就挂了。在一开始你有一定的初始生命力,现在问这个初始的生命力最少是多少,才能保证你能够找到一条路。走到右下角。每一步只能向右或者向下。
2014-02-20 01:40:17
3640
原创 [LeetCode] Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.这题不难,突破点是抓住前序遍历和中序遍历的本质:前序遍历中的第一个访问节点必须是根节点,然后是左右子树;中序遍历中
2013-12-31 00:32:31
1227
原创 面试题中的二叉树根据和寻路径问题
二叉树是面试里常考的一类数据结构,其中有一类寻找路径问题很有意思。目前见过两种类型题目,都是先给出一个和,然后要求打印出节点值之和与此相等的路径问题。
2013-12-24 04:04:02
1947
原创 使用PuTTY时对原始设置的几个简单实用修改
总结几条对PuTTY的原始设置最简单实用的几个修改,包括避免出现乱码,避免自动断开连接,以及避免频繁发出系统警报声等。
2013-12-05 01:56:09
3524
原创 总结排序(或部分排序)矩阵上的搜索问题
在排好序(或者部分排好序)的矩阵上进行搜索是考察多维数组操作和查找的一种经典面试题类型。这里假设行数和列数分别是M和N。下面根据难度来总结一下几个不同的题目变体。
2013-12-03 06:52:54
2555
原创 [LeetCode] Sort List
Sort a linked list in O(n log n) time using constant space complexity.这题思路比较直接。按照题目要求,需要在O(N*logN)时间内完成排序,所以可以考虑的排序方法只有三个:快速排序、归并排序和堆排序。然而,快速排序要求能在常数时间内置换两个指定元素,所以需要支持O(1)时间内的随机访问,这个无法在链表上实现,所以可以排
2013-11-21 12:56:34
1534
原创 [LeetCode] LRU Cache
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be positive) of the key if
2013-11-12 04:35:23
8410
原创 [LeetCode] Word Ladder
Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter can be changed at a timeEach intermediate word m
2013-11-10 15:09:11
1287
原创 [LeetCode] Substring with Concatenation of All Words
这题一开始做了很久,尝试了先将L里的每个词的开头字符都提取出来,相同开头字符的归为一类词群,然后把L转化为了一个multimap,这样的话每次看开头字符找到可能匹配的词群所需时间就是O(1)了。之后再以S中的每个字符作为起点,开始了使用DFS逐个匹配查找。当然,最后剩的少许字符可以不用考虑,因为光剩下的子字符串的长度可能就不够覆盖L里的所有词了。这个过程很复杂的,关键是回溯的过程中,删除和恢复
2013-11-09 05:15:33
6541
原创 [LeetCode] Candy
There are N children standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least on
2013-11-09 00:51:19
2664
6
转载 HashMap、HashTable、LinkedHashMap和TreeMap用法和区别
Java为数据结构中的映射定义了一个接口java.util.Map,它有四个实现类,分别是HashMap、HashTable、LinkedHashMap和TreeMap。本节实例主要介绍这4中实例的用法和区别。关键技术剖析:Map用于存储键值对,根据键得到值,因此不允许键重复,值可以重复。l (1)HashMap是一个最常用的Map,它根据键的hashCode值存储数据,根据键可以直
2013-11-09 00:14:27
2216
Cracking The Coding Interview 5th Ed (高清版下卷)
2013-12-31
Cracking The Coding Interview 5th Ed (高清版上卷)
2013-12-31
elements of programming interviews
2013-12-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人