both are possible in O(1) deletion: copy the next node (data and pointer) to current node(data and pointer). delete the next node. insertion: reverse of delete. Thank you, Siddharam
On Mon, Aug 8, 2011 at 9:54 PM, Debabrata Das < debabrata.barunhal...@gmail.com> wrote: > ok deletion is possible for the current pointer in a singly linked list. > just keep on copying the next node to the current node untill you > reach last node and delete the last node > No idea abt insertion,let me check > > On Mon, Aug 8, 2011 at 9:40 PM, pankaj kumar <pancsen...@gmail.com> wrote: > > if doubly link list then it is possible to insert a new node before the > > current pointer. > > > > -- > > 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. > > > > -- > 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. > > -- 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.