上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 33 下一页
摘要: Given a string , " This is a test" reverse it: " tset a si siht"Do this recursively.public class reverseStringRecursive { private static vo... 阅读全文
posted @ 2016-01-23 06:23 Hygeia 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 就是permutations II考虑有重复字母的情况。String str = "someString"; char[] charArray = str.toCharArray();对char array进行排序:Arrays.sort(charArray)之后再把CharArray转化成stri... 阅读全文
posted @ 2016-01-23 05:31 Hygeia 阅读(211) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array arr[] and a number x, write a function that counts the occurrences of x in arr[]. Expected time complexity is O(Logn)Examples: I... 阅读全文
posted @ 2016-01-23 05:17 Hygeia 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Given a list of child->parent relationships, build a binary tree out of it. All the element Ids inside the tree are unique.Example:Given the following... 阅读全文
posted @ 2016-01-23 03:55 Hygeia 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as three sides of tr... 阅读全文
posted @ 2016-01-23 01:31 Hygeia 阅读(342) 评论(0) 推荐(0) 编辑
摘要: Develop an algorithm to schedule an executive’s day, given a list of people the executive has to meet with, the amount of time they request to see the... 阅读全文
posted @ 2016-01-22 14:30 Hygeia 阅读(155) 评论(0) 推荐(0) 编辑
摘要: A question by dongfeiwww:打印一个数的所有乘数组合,从大到小,不要有重复Print all unique combinations of factors of a positive integer. For example given 24:24*112*28*36*46*2... 阅读全文
posted @ 2016-01-22 13:56 Hygeia 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Find all the repeating substring of specified length in a large string sequence.For e.g.Input String: "ABCACBABC" repeated sub-string length: 3 Output... 阅读全文
posted @ 2016-01-22 13:41 Hygeia 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Many of the Java programmers know what 'Hashcode' means, but don't really know how exactly it is calculated and why 31 is used to calculate the hashco... 阅读全文
posted @ 2016-01-22 02:41 Hygeia 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1.How java implements HashMapHashMap Custom implementation in java - How HashMap works internally with diagrams and full programhttp://www.javamadesoe... 阅读全文
posted @ 2016-01-22 02:00 Hygeia 阅读(238) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 33 下一页