It can be done is O(n) time by dividing the number with 10 and converting
the remainder to string using switch case.
Keeping doing this untill n/10 is greater than zero.


On Mon, Jun 21, 2010 at 3:21 AM, jalaj jaiswal <[email protected]>wrote:

> given an integer.. assume some range by yourself
> give an algo such that if i input 1024 it outputs one thousand twenty four
>
> --
> With Regards,
> Jalaj Jaiswal
> +919026283397
> B.TECH IT
> IIIT ALLAHABAD
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<algogeeks%[email protected]>
> .
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to