摘要: Static and dynamic binding in javaBefore Iexplainstatic and dynamic binding in java, lets discuss few terms which will help you to understand the conc... 阅读全文
posted @ 2015-03-12 12:50 lilyfindjob 阅读(298) 评论(0) 推荐(0) 编辑
摘要: Sort a linked list inO(nlogn) time using constant space complexity.findMiddle: 将listnode 不停的拆分sort: 将拆分好的不同的sortmerge: 将sort好的,向上merge/** * Definition... 阅读全文
posted @ 2015-03-08 07:20 lilyfindjob 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 至少有小写字母,大写字母,数字,特殊字符static bool IsLetter(char c){ return (c >= 'a' && c = 'A' && c = '0' && c 32 && c IsLetter(c)) && password.Any(c => IsD... 阅读全文
posted @ 2015-01-22 13:05 lilyfindjob 阅读(184) 评论(0) 推荐(0) 编辑
摘要: public class DiameterOfTree { public static int diameter = 0; public static int getDiameter(BinaryTreeNode root) { if (root != null) { ... 阅读全文
posted @ 2015-01-15 12:31 lilyfindjob 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 找出一个string中第一个重复出现的单词;sample: he had had a good son.output: had句子中可能会出现,comma,colon, semicolon, dash, fullstop/dot解法:1;dash和dot 都是regular expression中的... 阅读全文
posted @ 2015-01-15 12:22 lilyfindjob 阅读(534) 评论(0) 推荐(0) 编辑
摘要: Given n items with size A[i], an integer m denotes the size of a backpack. How full you can fill this backpack?注意You can not divide any item into smal... 阅读全文
posted @ 2015-01-14 08:21 lilyfindjob 阅读(562) 评论(0) 推荐(1) 编辑
摘要: Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ... 阅读全文
posted @ 2015-01-14 05:00 lilyfindjob 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a... 阅读全文
posted @ 2015-01-14 00:59 lilyfindjob 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2014-12-27 03:20 lilyfindjob 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume that the arr... 阅读全文
posted @ 2014-12-26 12:42 lilyfindjob 阅读(132) 评论(0) 推荐(0) 编辑