I have an examination coming up in the next few weeks and having looked over some of the previous papers I have come across a question that keeps appearing which I am unable to answer and I would be very grateful for your help.
Write a function that deletes the ith node from a circular linked list !!
I have no problems deleting a node in two way linked and was wondering if someone could have a look at my code and let me know if I am tackling this problem in the correct way.
in that case you'd probably want to remove the while loop, depending on how your list functions. EX: if you have 5 nodes and you want to delete the 7th node, then the while loop would prevent that. I'm not sure if that's proper behavior for the list you're being tested on though. You'd just use a for loop instead.