Q3.
start with 70000000 //8 digit number

70000000
70000001 //as 7 is 1 time so 8th place is 1
60000001 //as due to 1 on 8th place no. of zeros =6
60000010 //as 6 is present so 7th place is 1 and 7 is not present so 8th
place is again changed to 0
61000010 //as 1 is present on 7th place so at 2nd place there should be 1
51000010 //as 2nd place is 1 so 0 count remains 5 now
51000100 //as 5 is present so 6th place is 1 and 6 is not present so 7th
place is again changed to 0
52000100 //as count of 1 becomes 2  above
52100100 //as 2 is present on 1st place so 3rd place is 1
42100100 // count of 0 remains 4 so 1st place is 4
42101000 // as 4 is present so 5th place is 1 and 5 is not present so 6th
place is again changed to 0

On Thu, Jul 7, 2011 at 8:24 PM, raj singh <ankurkaku...@gmail.com> wrote:

>
>
>
> thanks yogi.
>>
>    it is amzing tric and solution
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@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" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to