XOR Linked List – A Memory Efficient Doubly Linked List | Set 2 In the previous post , we discussed how a Doubly Linked can be created using only one space for address field with every node. In this post, we will discuss implementation of memory efficient doubly linked list. We will mainly discuss following two simple functions. 1) A function to insert a new node at the beginning. 2) A function to traverse the list in forward direction. In the following code, insert() function inserts a new node at the beginning. We need to change the head pointer of Linked List,
Read full article from XOR Linked List – A Memory Efficient Doubly Linked List | Set 2 | GeeksforGeeks
No comments:
Post a Comment