What is Circular linked list? The circular linked list is a linked list where all nodes are connected to form a circle. In a circular… Read More
Inserting a new node in a doubly linked list is very similar to inserting new node in linked list. There is a little extra work… Read More
Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1)  Examples:  Input: 1->2->3->4->5->6 Output:… Read More
Given a Binary Tree, The task is to convert it to a Doubly Linked List keeping the same order.  The left and right pointers in… Read More
In this article, the Linked List implementation of the queue data structure is discussed and implemented. Print ‘-1’ if the queue is empty. Recommended Practice… Read More
Given a singly linked list, sort it using bubble sort. Input : 10->30->20->5 Output : 5->10->20->30 Input : 20->4->3 Output : 3->4->20 C // C… Read More
Given a singly linked list, write a function to swap elements pairwise. For example, if the linked list is 1->2->3->4->5->6->7 then the function should change… Read More
It was a very good experience to face interview at Qualcomm. I have attended the interview for a position of Embedded SW application developer and… Read More
Given a stream of characters, find the first non-repeating character from the stream. You need to tell the first non-repeating character in O(1) time at… Read More
Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume… Read More
Given two linked lists, insert nodes of second list into first list at alternate positions of first list. For example, if first list is 5->7->17->13->11 and… Read More
VMWare interview for MTS-2 position. I Telephonic round 1. Given an array of strings. Find the maximum prefix among all the strings. Ans: First told… Read More
Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL). The left and right pointers in nodes are to be used as previous… Read More
Given a linked list, apply the Quick sort algorithm to sort the linked list. The important things about implementation are, that it changes pointers rather… Read More
Given a linked list and two integers M and N. Traverse the linked list such that you retain M nodes then delete next N nodes,… Read More