Even if you use bucket sort, you will have to store the numbers arriving, or
atleast 1..10000 numbers along with their count. If you reduce the size of
the bucket further you will have to make a list associated with the buckets.
So asymptotically you will again reach the same space complexity.

Anurag Sharma


On Thu, Jun 10, 2010 at 5:16 AM, sharad kumar <[email protected]>wrote:

> can u reduce the size by making use of bucket sort????
>
> On Wed, Jun 9, 2010 at 5:01 PM, sharad <[email protected]> wrote:
>
>> I have a stream of numbers coming one by one from a computer generated
>> program. I know that these numbers will be between 0 and 10000. In
>> minimum time how can I sort them. Space is no constraint.
>> Later we have to try and optimize the space to as minimum as possible
>>
>> --
>> 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.
>>
>>
>
>
> --
> yezhu malai vaasa venkataramana Govinda Govinda
>
>  --
> 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