🗑️ Student Database - Deletion Operations

Remove students from the singly linked list using delete operations!

🎯 Problem: Manage Student Database

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

🗑️ Supported Deletion Operations

We can remove students in three ways:

Operation Details:

  1. 1 → Delete first student (head)
  2. 2 → Delete last student
  3. 3 P → Delete student at position P (1-based index)
  4. -1 → Finish all operations
10
20
30
40
null

Example: Operation "1" removes the first node (10)

🎮 Interactive Demo

Waiting for initial roll numbers...

Empty List → null

📋 Final Student Database