Each of the following 10 tasks should have 3 parts-
- Pseudo code/ java code
- Tracing
- Final output
Task 1:
Create a DoublyList of 5 elements using your nickname. Hint: If your name is John, then the elements should be β
Task 2
Print the elements in the List. Task 3
Count the number of elements in the List. Task 4
Get an element from the List where an index is given where index will be (last 3 digit of your ID%5).
Task 5
Set an element in the List where an index is given where index will be (last 3 digit of your ID%4).
| Deadline
|
Prev |
DummyHead |
Next |
|
P |
John1 |
N |
|
P |
John2 |
N |
|
P |
John3 |
N |
|
P |
John4 |
N |
|
P |
John5 |
N |
Task 6
Search an element from the List where an index is given where index will be (last 3 digit of your ID%3).
Task 7
Insert an element in the List in β
- First position
- Last position
- A random position where Index will be (last 3 digit of your ID%5)
Task 8
Remove an element from the list from β
- First position
- Last position
- A random position where Index will be (last 3 digit of your ID%4)
Task 9
Make a reversed copy of the List.
Task 10
Rotate the List β
- To the right by 1 position.
- To the left by 2 position.
- To the right by 1 position.
- To the left by 1 position.
****************************************************************************** ******************************************************************************




