Assumption here is that we can use 4K memory other than considering
the actual elements storage memory.
we were given the range of elements.. we can use count sort.
for first case, all elements are unique --> we can use 27000 bits to
represent the corresponding numbers==> takes 3375 Bytes < 4KB.
for second case,I couldn't find any better than O(nlogn) algo ...

On 1/19/12, Arun Vishwanathan <[email protected]> wrote:
> Given large number of elements. All elements belong to range 1 to 27000.
> First case no elements repeated and second case elements are repeated.
> memory capacity is 4k. How to sort efficiently?
>
> --
> 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.
>
>


-- 


**Regards
*
* <[email protected]>

Bharat B | M.Tech II  | Computer Science & Engineering | IITM
*
*
*Ph: +91 8056127652*

-- 
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