Files
java-interview-lab/linked-list/output/13-singly-session.txt
T

177 lines
2.7 KiB
Plaintext

The 2015 singly linked list menu program, same keystrokes as the original article
=================================================================================
keystrokes: 1 2 10 1 3 50 1 1 20 2 1 3 90 4 3 50 3 1 2 1 2 2 4 1 3 80 4 2 3 2 4 5
output identical to the 2015 article's sample output: true
--- 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...