Re: [algogeeks] sorting in O(n) time

2011-08-02 Thread Surendra Gupta
Counting sort, radix sort, . On Wed, Aug 3, 2011 at 10:58 AM, AMAN AGARWAL mnnit.a...@gmail.com wrote: Hi, How can we sort one unsorted int array with O(n). Unsorted : {4,2,6,1,5,5,1,2,45,444,44,45,4,1} Sorted : {1,1,1,2,2,4,4,5,5,6,44,45,45,444} Is there any sorting method which

Re: [algogeeks] Re: google questions

2011-02-02 Thread Surendra Gupta
@Indore Create a hash table of words, and get the top n counter from the hast count. On Wed, Feb 2, 2011 at 1:58 PM, snehal jain learner@gmail.com wrote: @ above you approach trie needs lot of optimization.. this will take up lot of space...trie is suitable in case where we want to reduce

[algogeeks] Re: Adobe Quest....

2010-12-18 Thread surendra
unsigned int reverseBits(unsigned int num) { unsigned int count = sizeof(num) * 8 - 1; unsigned int reverse_num = num; num = 1; while(num) { reverse_num = 1; reverse_num |= num 1; num = 1; count--; } reverse_num = count; return

Re: [algogeeks] 4th year project ideas

2010-10-19 Thread Surendra Gupta
You are in wrong group. On Wed, Oct 20, 2010 at 4:20 AM, Ayush Mittal ayushmittal2...@gmail.comwrote: hello friends. plz suggest some new ideas for java projects for IT 4th year -- You received this message because you are subscribed to the Google Groups Algorithm Geeks