3. Create a randomly generated Doubly linked list of 10 integers using the class
ID: 3650078 • Letter: 3
Question
3. Create a randomly generated Doubly linked list of 10 integers using the class IntDLList.java. For example, your list could be:
[ 3 1 2 5 8 7 9 0 1 6 ].
Now delete every 7th element from the list and print it. Note that if you reach the end then you have to reverse the direction of counting. Your output could be as follows:
After deleting 7th element:
[ 3 1 2 5 8 7 9 0 1 6 ] => [ 3 1 2 5 8 7 0 1 6 ].
After deleting 7th element again (counting in the same direction, then moving reverse),
[ 3 1 2 5 8 7 0 1 6 ] => [ 3 1 2 5 7 0 1 6 ].
After deleting 7th element again (counting in the same direction, then moving reverse),
[ 3 1 2 5 7 0 1 6 ] => [ 3 1 2 7 0 1 6 ]
Continue doing this until there is only one element left in the list.
Add any necessary methods required in the IntDLList.java file.
TheIntDLList.java and all other files, SLLNode and other are here.
https://dl.dropbox.com/u/3075114/LinkedLists-1.rar