That can never be done in constant time :).
If you can find one solution, then please let us know.
On Sat, Jul 23, 2011 at 1:13 AM, rShetty wrote:
> SO what about If my Linked list is a sorted list and the new node I
> wanna insert must maintain that sorted nature , So can then be the
> insertio
i think for sorted order. u hv to traverse the list.it cant be in const time
On Sat, Jul 23, 2011 at 1:13 AM, rShetty wrote:
> SO what about If my Linked list is a sorted list and the new node I
> wanna insert must maintain that sorted nature , So can then be the
> insertion of a node be done in
SO what about If my Linked list is a sorted list and the new node I
wanna insert must maintain that sorted nature , So can then be the
insertion of a node be done in constant time without traversing the
list ??
On Jul 23, 12:26 am, Pankaj wrote:
> If you know circular list, what is avoiding you f
So we should maintain a tail pointer and add nodes next to the tail
pointer ??? Right ???
On Jul 23, 12:26 am, Pankaj wrote:
> If you know circular list, what is avoiding you from maintaining a tail
> pointer.
> You just need to tweak insert and delete function a little bit for corner
> cases.
>
If you know circular list, what is avoiding you from maintaining a tail
pointer.
You just need to tweak insert and delete function a little bit for corner
cases.
On Sat, Jul 23, 2011 at 12:50 AM, rShetty wrote:
> Algorithm Please ... Thank You
>
> On Jul 23, 12:17 am, vaibhav shukla wrote:
> >
Algorithm Please ... Thank You
On Jul 23, 12:17 am, vaibhav shukla wrote:
> maintain just a tail pointer
>
> On Sat, Jul 23, 2011 at 12:45 AM, rShetty wrote:
> > Come Up with an Algorithm to implement the insertion of a node in
> > circular linked list without actually traversing the list ?