Remove students from the singly linked list using delete operations!
Hi! I'm Teju 👋 We start with an initial list of student roll numbers (end with -1).
Then we perform deletion operations:
• 1: Delete from beginning
• 2: Delete from end
• 3 P: Delete from position P (1-based)
• -1: Stop
Part 1: Initial roll numbers → end with -1
Part 2: One deletion operation per input (1 / 2 / 3 P / -1)
Output: Final remaining roll numbers
We can remove students in three ways:
Example: Operation "1" removes the first node (10)
Waiting for initial roll numbers...
Linked List Elements: