摘要: I am a software engineer in Facebook. I joined Facebook a year ago and now doing some iOS stuff. If you are interested in Facebook and good at algorit... 阅读全文
posted @ 2014-10-22 12:12 chkkch 阅读(960) 评论(2) 推荐(0) 编辑
摘要: Accept的公司:Facebook, DeNA, SAP, Intel, ARMFail的公司:阿里巴巴,腾讯,百度,Google,微软,平安科技,豆瓣,雅虎,Amazon,NVIDIA,EMC,VMware,还有各种说不上名字的小公司今年(确切的说是从去年暑假开始)的工作实在不好找。随着国内的经济形势下降,公司的招的人也随之下降得厉害。腾讯,阿里这些往年招生大户今年只招精英,阿里在上海似乎达到了个位数!而我的求职经历应该是从9月开始,而准备则是8月底就开始了。Dream OfferFacebook:说起面FB可能也是当初不经意地投了海外的HR邮箱,然后就安排了skype面试,再之后就是on 阅读全文
posted @ 2013-11-01 09:56 chkkch 阅读(8930) 评论(21) 推荐(12) 编辑
摘要: Problem StatementCucumber Boy likes drawing pictures. Today, he plans to draw a picture using a very simple graphics editor.The editor has the following functions:The canvas is an infinite two-dimensional grid of pixels.There are only two colors: black, and transparent. These are denoted 'B' 阅读全文
posted @ 2012-12-02 14:45 chkkch 阅读(688) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 / \ 2 3Return6. 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *rig... 阅读全文
posted @ 2012-12-02 14:05 chkkch 阅读(2791) 评论(0) 推荐(1) 编辑
摘要: Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at mosttwotransactions.Note:You may not engage in multiple transactions at the same time (ie, you must sell the stock before you buy again). 1 class So 阅读全文
posted @ 2012-11-29 19:35 chkkch 阅读(2099) 评论(0) 推荐(0) 编辑
摘要: 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 the entire input string (not partial).The function prototype should be:bool i 阅读全文
posted @ 2012-11-27 10:23 chkkch 阅读(1377) 评论(0) 推荐(0) 编辑
摘要: The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0.For example, givenn= 2, return[0,1,3,2]. Its gray code s 阅读全文
posted @ 2012-11-26 21:44 chkkch 阅读(2321) 评论(1) 推荐(1) 编辑
摘要: Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened tree should look like: 1 \ 2 \ 3 \ 4 \ 5 \ 6Hints:If you notice carefully ... 阅读全文
posted @ 2012-11-26 21:39 chkkch 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: Divide two integers without using multiplication, division and mod operator. 1 class Solution { 2 private: 3 long long f[100]; 4 public: 5 int bsearch(long long a[], int left, int right, long long key) 6 { 7 if (left > right) 8 return -1; 9 10 int ... 阅读全文
posted @ 2012-11-26 21:23 chkkch 阅读(1191) 评论(0) 推荐(0) 编辑
摘要: Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack. 1 class Solution { 2 public: 3 char *strStr(char *haystack, char *needle) { 4 // Start typing your C/C++ solution below 5 // DO NOT write int main() functi... 阅读全文
posted @ 2012-11-26 20:51 chkkch 阅读(1889) 评论(0) 推荐(0) 编辑