The past week I was basically working on improving my API by fixing some bugs like:
- Inserting an element at index beyond the size of the list or at a negative index
- Popping nodes from empty list
- Connecting the current child list’s tail to the next child list’s head and similar corner cases.
Planning for the coming week:
- Figured a major issue with APIs concat and slice i.e. APIs were using a shallow copy of the lists that might lead to data leak/fragmentation. So change the code to create a deep copy of the list for both the APIs.
- Implement a new API absorb (Inspired by the wrong implementation of concat).
before - ListA, ListB
API call - ListA.absorb(ListB)
after - ListA = ListA+ListB(shallow copy), ListB = empty
- Document my project.