Data Structures Lab3 (Java)