CODING
SYSTEM DESIGN
PLACEMENT PREP.
BLOG
LOGIN/REGISTER
MY ACCOUNT
LOGOUT
Compare to strings given as linked list
In C language, string library has a function strcmp that takes two arguments and return -1, 0 or 1 depending on whether first string is
[…]
Reversing a doubly linked list
Given a doubly linked list. Write a function to reverse it. If given list is then output of our function should be
Increment a number given in the form of linked list
Given a large number represented in the form of a linked list, Write code to increment the number in-place. For example:
Fix loop in a sorted linked list
Given a Sorted linked list which has a loop (link pointer of last node is not NULL and points to some other node). Fix the
[…]
Singly linked list implementation of Queue
In a general Queue (at any office or bank or any other place), people join the queue at the end and are removed from the
[…]
Inserting in a linked list
Given a Singly linked list. Write functions to insert at different positions in the list: At start of the linked list. At end of the
[…]
Linked List Implementation of Stack in C++
Write a class which will implement the Stack data structure in C++. Give the declaration & definition of the class. Also define the Node. For
[…]
Sorting a linked list
Write a function to sort the given unsorted linked list. Input list: 6 -> 7 -> 0 -> 1 -> 8 -> 2 -> 4
[…]
Sorting a linked list of 0s, 1s and 2s
Given a Singly linked list with each node containing either 0, 1 or 2. Write code to sort the list. Input List: 1 -> 1
[…]
Rotating a linked list around pivot
We have seen a question to rotate an array around a pivot earlier. Now write similar code for linked list. Given a linked list and an
[…]
Load more