Package algs13
Class MyDeque
java.lang.Object
algs13.MyDeque
This is a skeleton file for your homework.
Complete the functions below.
You may also edit the function "main" to test your code.
You should not use any loops or recursions, except in "delete"
Delete may use one loop or recursive helper.
You must not add fields or static variables.
As always, you must not change the declaration of any method.
Do not change any of the methods I have provided, such as "toString" and "check".
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescription(package private) MyDeque.Node
(package private) MyDeque.Node
(package private) int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
private static void
private static void
checkInvariants
(String message, MyDeque that) void
double
delete
(int k) boolean
isEmpty()
static void
double
popLeft()
double
popRight()
void
pushLeft
(double item) void
pushRight
(double item) private static void
int
size()
toString()