📚 Attendance Tracking System

Build a Singly Linked List by adding student roll numbers!

🎯 Problem: Track Attendance

Hi! I'm Teju 👋 Students enter the class and type their roll numbers.

We store them in a Singly Linked List – each new student is added to the end!

Enter roll numbers one by one (or multiple separated by space). Stop by entering -1.

Input: Positive integers (roll numbers), end with -1

Output: All roll numbers in the order they arrived

Data Structure: Singly Linked List (dynamic insertion)

🔗 Singly Linked List Basics

A Singly Linked List is a chain of nodes. Each node has:

• Data (roll number)
• Pointer to next node

We maintain a head (start) and add new nodes at the end.

Insertion Process:

  1. Create a new node with the roll number
  2. If list is empty → new node becomes head
  3. Else → traverse to the last node
  4. Set last node's next → new node
  5. New node’s next → null
10
20
30
null

Each new roll number becomes a new node at the end →

🎮 Interactive Demo

Start adding roll numbers...

Empty List → null

📋 Final Attendance List