nikhil
BAN USER
Comments (6)
Reputation 0
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
0
of 0 vote
Modified a bit
1) Take two Pointers at Head of linked list say P1 and P2
2) Move P2 till isDigit = true and store P2prev node
P2prev->next= P2->next
P2->next= P1->next
P1->next=P2
P1=P1->next->next
3) Move node pointed by P2 to P1 next
4) Move P2 by 1 Move P1 by 2
5) Repeat step 2,3,4 till P2 != null
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
- nikhil May 27, 2013