Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6r9iSyHu5qSJMzH2n
171 lines
2.4 KiB
Plaintext
171 lines
2.4 KiB
Plaintext
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 1
|
|
1. Insert at position
|
|
2. Insert at first
|
|
3. Insert at last
|
|
Enter choice: 2
|
|
Enter element: 10
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 1
|
|
1. Insert at position
|
|
2. Insert at first
|
|
3. Insert at last
|
|
Enter choice: 3
|
|
Enter element: 50
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 1
|
|
1. Insert at position
|
|
2. Insert at first
|
|
3. Insert at last
|
|
Enter choice: 1
|
|
Enter element: 20
|
|
Enter position: 2
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 1
|
|
1. Insert at position
|
|
2. Insert at first
|
|
3. Insert at last
|
|
Enter choice: 3
|
|
Enter element: 90
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 4
|
|
List: 10 20 50 90
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 3
|
|
Enter element to search: 50
|
|
Element found at position: 3
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 3
|
|
Enter element to search: 1
|
|
Element not found
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 2
|
|
1. Remove first element
|
|
2. Remove last element
|
|
3. Remove element at position
|
|
Enter choice: 1
|
|
Removed: 10
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 2
|
|
1. Remove first element
|
|
2. Remove last element
|
|
3. Remove element at position
|
|
Enter choice: 2
|
|
Removed: 90
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 4
|
|
List: 20 50
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 1
|
|
1. Insert at position
|
|
2. Insert at first
|
|
3. Insert at last
|
|
Enter choice: 3
|
|
Enter element: 80
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 4
|
|
List: 20 50 80
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 2
|
|
1. Remove first element
|
|
2. Remove last element
|
|
3. Remove element at position
|
|
Enter choice: 3
|
|
Enter position: 2
|
|
Removed: 50
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 4
|
|
List: 20 80
|
|
|
|
--- Singly Linked List Menu ---
|
|
1. Insert
|
|
2. Remove
|
|
3. Search
|
|
4. Display
|
|
5. Exit
|
|
Enter choice: 5
|
|
Exiting...
|