FlexiList is a Java data structure that combines the benefits of arrays and linked lists. Like an array, it allows for efficient access to elements by index. Like a linked list, it allows for efficient insertion and deletion of elements at any position in the list.
Benefits Over Arrays and ArrayList
->Efficient Insertion and Deletion: FlexiList can insert or delete nodes at any position in the list in O(1) time, whereas arrays require shifting all elements after the insertion or deletion point.
->Dynamic Size: FlexiList can grow or shrink dynamically as elements are added or removed, whereas arrays have a fixed size.
->Good Memory Locality: FlexiList nodes are stored in a contiguous block of memory, making it more cache-friendly than arrays.
->Faster Insertion and Deletion: FlexiList can insert or delete nodes at any position in the list in O(1) time, whereas ArrayList requires shifting all elements after the insertion or deletion point.
Features
- Efficient Insertion and Deletion:
- Dynamic Size:
- Good Memory Locality:
- Faster Insertion and Deletion:
- Better Memory Efficiency:
License
MIT LicenseFollow FlexiList.
User Reviews
-
Awsome swap method is great and also built in clone method.