node p=head;q=head.next.next;
while(q.next!=null && q.next.next!=null)
{
   p.next=q;
   p=q;
   q=q.next.next;
}
if(q.next!=null)q.next=null;

On Tue, Aug 23, 2011 at 11:48 PM, aditi garg <aditi.garg.6...@gmail.com>wrote:

> i wud suggest u to write one urself...ill help u improve it...u already
> have the logic now...
>
>
> On Tue, Aug 23, 2011 at 11:43 PM, aayush jain <ajain...@gmail.com> wrote:
>
>> thanx aditi ....
>> n can u know  code of alternate delete in even or odd places ....
>>
>>  --
>> 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.
>>
>
>
>
> --
> Aditi Garg
> Undergraduate Student
> Electronics & Communication Divison
> NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
> Sector 3, Dwarka
> New Delhi
>
>
>  --
> 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.

Reply via email to