摘要:
There areNintegers in an arrayA. All but one integer occur in pairs. Your task is to find out the number that occurs only once.Input FormatThe first l... 阅读全文
摘要:
题目链接:Running Time of QuicksortChallengeIn practice, how much faster is Quicksort (in-place) than Insertion Sort? Compare the running time of the two a... 阅读全文
摘要:
Insertion Sort is a simple sorting technique which was covered in previous challenges. Sometimes, arrays may be too large for us to wait around for in... 阅读全文
摘要:
题目连接:Sherlock and MiniMaxWatson gives Sherlock an arrayA1,A2...AN.He asks him to find an integerMbetweenPandQ(both inclusive), such that,min {|Ai-M|, ... 阅读全文
摘要:
题目连接:Game Of RotationMark is an undergraduate student and he is interested in rotation. A conveyor belt competition is going on in the town which Mark... 阅读全文
摘要:
Watson gives an array A1,A2...AN to Sherlock. Then he asks him to find if there exists an element in the array, such that, the sum of elements on its ... 阅读全文
摘要:
QuickSortIn the previous challenge, you wrote a partition method to split an array into 2 sub-arrays, one containing smaller elements and one containi... 阅读全文
摘要:
In this challenge you need to print the data that accompanies each integer in a list. In addition, if two strings have the same integers, you need to ... 阅读全文