Skip to content

kgarbacinski/Singly-Multi-Linked-Lists-Simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Singly- and multi- linked lists

Instruction:

  • Commands
  1. New T1 W – creates a new "T1" train with one "W" car and inserts it into the trains' list.
  2. InsertFirst T1 W – appends existing "W" car to the beginnig of "T1" train.
  3. InsertLast T1 W – appends existing "W" car to the end of "T1" train.
  4. Display T1 – displays the whole "T1" train.
  5. Trains – displays all trains.
  6. Reverse T1 – reverses the order of cars in the "T1" train.
  7. Union T1 T2 – appends the whole "T2" train to the end of "T1" train and erases "T2" from list.
  8. DelFirst T1 T2 – deletes first car from "T1" train and creates a new "T2" car with the erased beforehand car assuming it's the last lement in list.
  9. DelLast T1 T2 – deletes last car from "T1" train and creates a new "T2" car with the erased beforehand car assuming it's the last element in list.
  • Input:
  1. no. sets
  2. no. lines of the taken set
  3. line ...
  4. lines

About

Implementation of two- and one- way lists in Java.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages