lets say we have an array COUNT[256] which is initialized to zero.
1) traverse the string S from 0 to length-1
2) if COUNT[S[i] - '0'] == 0 , increment COUNT[S[i] - '0'] = 1;
3) else print the first repeating character.
-Mahesh
On Fri, Jun 8, 2012 at 2:26 PM, Anika Jain
I think if range is till n2, max passes for radix sort will be 3.
by subtracting 1 to all the numbers we get the max range to n2-1 and radix
sort can be done in 2 passes.
but what will happen when if we have a '0' in array and then we subtract 1
to it?
On Tue, May 8, 2012 at 9:48 AM, atul anand
First Tree:
1
2 3
4 5 67
Inorder traverse will be : 4251637
Second Tree:
6
1 3
Inorder traversal is 163.
But they second tree is not subset. let me know if i got the question wrong.
On Wed, Mar 21, 2012 at 10:27 AM, shady