Re: [algogeeks] Re: Link list problem..

2011-08-13 Thread Ankur pratik
ofcrce it is possible in case of singly linklist too

On Tue, Aug 9, 2011 at 10:47 PM, raghavendhra rahul 
rahulraghavend...@gmail.com wrote:

 i think u guys r getting the question wrong...the question was to delete
 the previous node of the current node and not the current node itself...

 --

 Regards
 Raghavendhra



 changing the face can change nothing .. but facing the change can
 change everything

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




-- 
Warm Regards--

Ankur Pratik
Computer Science  Engg Dept
Undergraduate Student
National Institute of Technology
Durgapur
India

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



Re: [algogeeks] Re: Link list problem..

2011-08-09 Thread raghavendhra rahul
i think u guys r getting the question wrong...the question was to delete the
previous node of the current node and not the current node itself...

-- 

Regards
Raghavendhra



changing the face can change nothing .. but facing the change can change
everything

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



[algogeeks] Re: Link list problem..

2011-08-08 Thread Abhishek Gupta
Errata:
sorry guys..
there is a change in the problem.. actually we have to INSERT a NEW NODE 
before the current pointer.
Now tell is it possible..
or again it is a stupid question..

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/JTEcmoixuksJ.
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.



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread pankaj kumar
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.



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread vamshi vijay
Let the present node be X, Crete a new node 'Y' and give X-next=Y.
Then swap(X-data,Y-data)

On 8 August 2011 09:06, Abhishek Gupta mailatabhishekgu...@gmail.comwrote:

 Errata:
 sorry guys..
 there is a change in the problem.. actually we have to INSERT a NEW NODE
 before the current pointer.
 Now tell is it possible..
 or again it is a stupid question..

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/JTEcmoixuksJ.

 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.




-- 
With Regards,
N.Vamshi Vijay,
Mtech,CSE
IIT Kharagpur
Mobile:-07501541110

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



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread Debabrata Das
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.



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread vaibhav shukla
current node deletion is possible
just copy the next value to the current value,now u are required to delete
the next node.Simple.

but if the deleted node is last one...this will give problem but that too
can be solved if using circular link list

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.




-- 
  best wishes!!
Vaibhav
  MCA

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



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread kumar raja
@Vamshi:

era kummestunnav ga assalu taggadamleduVamshi rockx

On 8 August 2011 21:54, Debabrata Das debabrata.barunhal...@gmail.comwrote:

 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.




-- 
Regards
Kumar Raja
M.Tech(SIT)
IIT Kharagpur,
10it60...@iitkgp.ac.in
7797137043.
09491690115.

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



Re: [algogeeks] Re: Link list problem..

2011-08-08 Thread siddharam suresh
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.



[algogeeks] Re: Link list Problem

2011-03-16 Thread Gene
I think Wirth mentions this idea in Algorithms + Data Structures = Programs, 
which dates from the 70's.

Of course this technique is useless if other pointers to the deleted note 
can exist. 
 
 

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



Re: [algogeeks] Re: Link list Problem

2011-03-16 Thread Balaji Ramani
Also useless if what is given is the pointer to the last node, in which case
the next pointer of last but one node will only remain dangling.

Thanks,
Balaji.

On Wed, Mar 16, 2011 at 7:31 PM, Gene gene.ress...@gmail.com wrote:

 I think Wirth mentions this idea in Algorithms + Data Structures =
 Programs, which dates from the 70's.

 Of course this technique is useless if other pointers to the deleted note
 can exist.



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



[algogeeks] Re: Link list Problem

2011-03-15 Thread ligerdave
the whole point of linked list is to use reference. so  just simply
replace values of current node with the next node's and have the
pointer pointing to the node that's next to next.

1-2-3-4-tail

saying you wanna remove 2, you have the pointer pointing to 3 and
became
1-3-4-tail



On Mar 13, 12:53 pm, UMESH KUMAR kumar.umesh...@gmail.com wrote:
 hi

  Given a singly Link list but Head of the List is
  unknown so my question is that 

           How to delete a given node from the List???

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