010 at 10:41 AM, srinivas reddy
wrote:
> @aravind prasad
>
> ho can u arrange the numbers
> 2,202
>
> suppose if u arrange 202 2
> ok u wiil get the least value
>
> now 2,242
> if u arrange in same manner as above u will get 242 2
> which is not smallest one...
>
if the intention of the problem is to do it in O(n)..
then we can do 2 passses.. one to find the no of 0 and 1..
then in 2nd pass,, put 0 in even and 1 in odd and leave the rest of
the array as such..
O(n)+O(n)=O(n).
On Aug 20, 5:40 pm, Ashutosh Tamhankar wrote:
> Here is a C++ version of the
for the method of comparison in insertion sort,, consider
1)compare the first digit of all nos and sort them
2)if they are same, go for next digit...
correct me if am wrong...
On Aug 21, 7:00 pm, Chonku wrote:
> Treat each number as string and make a trie out of it. For the first input
> [55
can anyone provide the correct and full logic for printing BST
spirally ..
consider a tree
a
/ \
bc
/ \ / \
d e f g
output==>> abcgfeh
here my doubt i
http://mc/compose?to=algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" grou