摘要: Write a program that gives count of common characters presented in an array of strings..(or array of character arrays)For eg.. for the following input... 阅读全文
posted @ 2016-01-23 08:44 Hygeia 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑