The set [1,2,3,…,n] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, We get the following sequence... Read More
posted @ 2014-08-18 22:41 Xylophone Views(150) Comments(0) Diggs(0)
Given a list, rotate the list to the right by k places, where k is non-negative.For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3... Read More
posted @ 2014-08-18 21:28 Xylophone Views(153) Comments(0) Diggs(0)
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You shoul... Read More
posted @ 2014-08-18 20:42 Xylophone Views(183) Comments(0) Diggs(0)
Given an absolute path for a file (Unix-style), simplify it.For example, path = "/home/", => "/home" path = "/a/./b/../../c/", => "/c"Corner Cases:Did... Read More
posted @ 2014-08-18 16:54 Xylophone Views(143) Comments(0) Diggs(0)
Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have t... Read More
posted @ 2014-08-18 11:20 Xylophone Views(182) Comments(0) Diggs(0)