This project extends the functionality of the 42 School's libft by adding new custom functions. The original libft
provides a collection of C functions for common tasks, and lift_extra
builds upon this foundation to offer additional functions.
The implementation of the equivalent bonus part is entire different, since I preffered to use a different structure for linked lists. In this case there is a struct for the list which contains pointers to the first and the last elements. This implementation is very useful to improve drastically the performance of algorithms like ft_lstaddback. The complexity drops from O(n) to O(1).
The "pure" libft
project can be found here:
libft
42_libft_extra is an extension of the original 42 School's libft, enhancing its functionality by introducing additional custom functions. While the core libft
provides a comprehensive set of C functions for common tasks, libft_extra
goes beyond, offering a supplementary collection of functions to address diverse programming needs.
One distinguishing feature of libft_extra is the reimagined implementation of the bonus part, where a different structure for linked lists has been adopted. Specifically, a struct for the list is introduced, incorporating pointers to both the first and last elements. This novel approach significantly enhances the performance of algorithms such as ft_lstaddback
, reducing the complexity from O(n) to O(1). This optimized structure is designed to expedite list operations, making it particularly advantageous for scenarios involving frequent additions to the end of the list.
For the original libft
project, you can refer to this repository here.
Feel free to navigate the source code and discover how these additional functions can complement and augment your programming experience.