Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Linked List cpp-double-pointer cpp-pointer

How to write C functions that modify head pointer of a Linked List?

Consider simple representation (without any dummy node) of Linked List. Functions that operate on such Linked lists can be divided in two categories: 1) Functions tha...
Linked List Linked List

Linked List representation of Disjoint Set Data Structures

Prerequisites : Union Find (or Disjoint Set), Disjoint Set Data Structures (Java Implementation) A disjoint-set data structure maintains a collection S = {S1, S2,&#x2...
Linked List Recursion Linked List

Practice questions for Linked List and Recursion

Assume the structure of a Linked List node is as follows. struct Node {   int data;   struct Node *next; }; Explain the fu...
Sorting Linked-List-Sorting Merge Sort

Why Quick Sort preferred for Arrays and Merge Sort for Linked Lists?

Why is Quick Sort preferred for arrays? Below are recursive and iterative implementations of Quick Sort and Merge Sort for arrays. Recursive Quick Sort for array. Ite...
Advanced Data Structure Linked List Linked List

Skip List Set 3 (Searching and Deletion)

In previous article Skip List | Set 2 (Insertion) we discussed the structure of skip nodes and how to insert an element in the skip list. In this article we will disc...
Linked List Linked List

A Programmer’s approach of looking at Array vs. Linked List

In general, array is considered a data structure for which size is fixed at the compile time and array memory is allocated either from Data section (e.g. global array...
Linked List Amazon Goldman Sachs

Given only a pointer/reference to a node to be deleted in a singly linked list, how do you delete it?

Given a pointer to a node to be deleted, delete the node. Note that we don’t have pointer to head node. Recommended: Please solve it on “PRACTICE&#x201...
Linked List Insertion Sort Linked List

Given a linked list which is sorted, how will you insert in sorted way

Given a sorted linked list and a value to insert, write a function to insert the value in a sorted way. Initial Linked List Linked List after insertion of 9 Recom...
Linked List Searching Linked List

Squareroot(n)-th node in a Linked List

Given a Linked List, write a function that accepts the head node of the linked list as a parameter and returns the value of node present at (floor(sqrt(n)))th positio...
Linked List Fraction Linked List

Find the fractional (or n/k – th) node in linked list

Given a singly linked list and a number k, write a function to find the (n/k)-th element, where n is the number of elements in the list. We need to consider ceil valu...

Subscribe to Our Newsletter