03 2014 档案

Reverse Words in a String
摘要:1 void reverseWords(string &s) { 2 string res = "", tmp = ""; 3 int l = s.length(); 4 int i = 0; 5 while(i < l){ 6 if(s[i] != ' ') 7 tmp += s[i++]; 8 else{ 9 if(tmp != ""){10 if(res == ""... 阅读全文

posted @ 2014-03-11 20:48 waruzhi 阅读(142) 评论(0) 推荐(0)

Median of Two Sorted Arrays
摘要:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文

posted @ 2014-03-11 20:17 waruzhi 阅读(265) 评论(0) 推荐(0)

LeetCode Question Difficulty Distribution
摘要:参考链接:https://docs.google.com/spreadsheet/pub?key=0Aqt--%20wSNYfuxdGxQWVFsOGdVVWxQRlNUVXZTdEpOeEE&output=htmlIDQuestionDiffFreqData StructureAlgorithms1Two Sum25arraysortsetTwo Pointers2Add Two Numbers34linked listTwo PointersMath3Longest Substring Without Repeating Characters32stringTwo Pointers 阅读全文

posted @ 2014-03-11 11:04 waruzhi 阅读(310) 评论(0) 推荐(0)

宝洁面试经典八大问题(附答案范例)
摘要:宝洁公司在中国高校招聘采用的面试评价测试方法主要是经历背景面谈法,即根据一些既定考察方面和问题来收集应聘者所提供的事例,从而来考核该应聘者的综合素质和能力。宝洁的面试由8个核心问题组成。宝洁公司招聘题号称由高级人力资源专家设计,无论您如实或编造回答, 都能反应您某一方面的能力。核心部分的题如下:Please provide concise examples that will help us better understand your capabilities.(1)Describe an instance where you set your sights on a high/dema.. 阅读全文

posted @ 2014-03-03 21:29 waruzhi 阅读(5016) 评论(0) 推荐(0)

做leetcode的几点体会分享(转)
摘要:1 大部分题目你都是可以自己做出来的。所以,第一遍尽量不要网上找答案;2 写了的不管通过的,不通过的答案要保存下来。不通过的,也要记录下来哪儿没有通过。很有可能你这次错了,不知道怎么搞过了,下次还是错;3 一定要手写几遍,手写远远比在机器上印象深刻;4 写code的过程中要用最safe的写法写,不要写模棱两可的,编译器相关的表达方式,这样在面试过程中很容易露馅;5 code的风格保持一致。比如,不要题目这个用vector,那个用array,这个传size,那个不传,这个check null,那个不check,这个用new,那个用malloc,这个用const,那个用macro。争取做到所有题目 阅读全文

posted @ 2014-03-01 21:28 waruzhi 阅读(373) 评论(0) 推荐(0)

导航