i think you can just enter elements in a sorted order ( ie applying
insertion sort as the elements are added ) like we do in Bucket sort ..
maintaining sorted buckets for a hash value ..

and maintaining the min element at the head always we can do deletion of min
and finding min in O(1) time because it is always the head.


On Sun, Jul 31, 2011 at 10:21 AM, pandharinath gorde <
pandharinath.go...@gmail.com> wrote:

> O(1) is possible in normal LL in below case:
>
> i.If u have head then insertion , deletion and accesss to first element at
> front .
> ii.if u have tail then insertion and access to  element  at last .
>
> if anything missing add anout normal LL
>
>
> On Sun, Jul 31, 2011 at 9:47 PM, siva viknesh <sivavikne...@gmail.com>wrote:
>
>> I think the exact question resembles as what ravinder kumar
>> said....And all these operations in O(1) time...ideas plz
>>
>> On Jul 31, 5:21 pm, Ravinder Kumar <ravinde...@gmail.com> wrote:
>> > Guys the real question is :
>> > Design a data structure which support following operation
>> > 1. insertion of an arbitrary element
>> > 2. removing the oldest element
>> > 3. Accessing min element
>> >
>> > --
>> > *With Regards :*
>> >
>> > Ravinder Kumar
>> > B.Tech Final Year
>> > Computer Science and Engineering
>> > MNNIT Allahabad
>>
>> --
>> 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.
>>
>>
>
>
> --
> Pandharinath Gorde
> +91-9620557641
>
>  --
> 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.
>



-- 
The more you sweat in the field, the less you bleed in war."

Ankit Minglani
NITK Surathkal

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