2015年3月30日
摘要: 这里看来的好的解答public boolean isNumber(String s) { if(s.trim().isEmpty()){ return false; } /* re* Mat... 阅读全文
posted @ 2015-03-30 23:50 Seth_L 阅读(103) 评论(0) 推荐(0) 编辑
摘要: CareerCup 看到的解答: 1. Get count of each word. 2. Create a MIN heap of word counts with 1st 100 elements. 3. Now for all other word counts , if... 阅读全文
posted @ 2015-03-30 23:37 Seth_L 阅读(142) 评论(0) 推荐(0) 编辑
摘要: /*** 这道题我加了个变形,reversed的* Given a nested list of integers, returns the sum of all integers in the list weighted by their depth* For example, g... 阅读全文
posted @ 2015-03-30 23:13 Seth_L 阅读(934) 评论(0) 推荐(0) 编辑
摘要: 不多说了,题目如下public interface Intervals { /** * Adds an interval [from, to] into internal structure. */ void addInterval(int from, i... 阅读全文
posted @ 2015-03-30 22:43 Seth_L 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 看到挺多公司最近考这个,做了一下。这个代码大部分是他的,觉得特别不错就用了。自己加了一些comment,值得重新做一遍public class Solution { public int ladderLength(String start, String end, Set di... 阅读全文
posted @ 2015-03-30 12:00 Seth_L 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 题目如下:public interface BlockingQueue{ /** Retrieve and remove the head of the queue, waiting if no elements are present. */ T take(); ... 阅读全文
posted @ 2015-03-30 11:01 Seth_L 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 看到LinkedIn有考这道题目,就做了一下。 没什么特别的,在queue里面加了一个null来表示是在当前level的尽头/** * Definition for binary tree * public class TreeNode { * int val; * ... 阅读全文
posted @ 2015-03-30 05:17 Seth_L 阅读(136) 评论(0) 推荐(0) 编辑