This is a collection of data structures implemented in Java for learning purposes.
Done in TimeTest class. Results w/10000 elements, 1 iteration:
Class | Add Time (ns) | Remove Time (ns) | Add Time / Min | Remove Time / Min
DynamicArray (DOUBLING) | 841513 | 78202079 | 1.785359 | 165.914018
DynamicArrayStack | 761549 | 771872 | 1.615707 | 1.637608
LinkedQueue | 696173 | 471341 | 1.477005 | 1.000000
LinkedStack | 661001 | 477050 | 1.402384 | 1.012112
SimpleHashMap | 3443630 | 764222 | 7.306027 | 1.621378
warmup | 671358 | 87512708 | 1.424357 | 185.667506
A simple resizable array.
A simple LIFO data structure using DynamicArray.
A simple LIFO data structure using nodes linked to the next one, storing first one.
A simple FIFO data structure using nodes linked to the next one, storing first and last one.
A simple implementation of a hash map, using nodes with access to the next one for resolving collisions.