Skip to content

This code implement the Deque data structure using array. Java programming language.

Notifications You must be signed in to change notification settings

voanhtuanvn12/Deque-ADT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Deque-ADT

This code implement the Deque data structure using array. Java programming language.

Problem statement:

Implement the Deque abstract data type using an array, called ArrayDeque. Implement the data structure yourself, do not use extra Java Collection classes.

For efficiency first, last, enqueueRear, enqueueFront, dequeueRear, dequeueFront, clear, size, and isEmpty should all be O(1) operations. Feel free to add any necessary private helper methods and a suitable toString which returns a string representation for your deque implementation.

Further enhance these classes to make sure all methods are safe from unexpected events using appropriate exception handling (example, if user code tries to remove something from the deque when empty, it should throw an appropriate exception). Create a test class with a suitable main method which effectively tests all operations on one or both Deque implementations.

About

This code implement the Deque data structure using array. Java programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages