Output of a C function

Given the following structure of Node of the Linked List: struct Node{ int data; Node *link; }; What is the purpose of the below function […]

Delete a linked list

Write a function to delete a linked list. The function should take a pointer to the head of the list and should delete all the […]

Insert in a sorted linked list

Given a linked list, with all the nodes in sorted order. Write a function that inserts a new integer in the sorted manner. i.e If […]

Recursive function to reverse a linked list

Earlier I talked about Reversing a Singly linked list without using recursion. Today let’s write a recursive function to reverse a singly linked list.

Reversing a Singly Linked list

Given a Singly linked list, write an iterative (non-recursive) function to reverse the linked list.

Check if a linked list is palindrome

Write a function to check if a Singly linked list is a palindrome or not. For example, the linked list 2 -> 3 -> 4 […]

Difference between linked list and Arrays

What is the difference between Linked List and Arrays?

Delete alternate node of the linked list

Given a linked list. Write code to delete alternate nodes from the list. For example: If the list given is 2 -> 3 -> 5 […]

Reversing a doubly linked list

Given a doubly linked list. Write a function that accepts a pointer to the head of the list and reverse the list.