We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e300d8b commit 16b5843Copy full SHA for 16b5843
1 file changed
src/main/lists/DynamicArray.java
@@ -35,6 +35,10 @@ public int getCapacity() {
35
return this.array.length;
36
}
37
38
+ public boolean isEmpty() {
39
+ return this.length == 0;
40
+ }
41
+
42
public DynamicArray<T> shrinkCapacity() {
43
Object[] newArray = new Object[this.length];
44
0 commit comments