Skip to content

Tag Archives: Traversal

Given a string str consisting of multiple words separated by space, the task is to print the vertical order traversal of this string. Vertical order… Read More
Given a singly linked list where each node represents a character including special characters, the task is to remove all the occurrences of special characters… Read More
Given a square matrix, the task is to find the element of the matrix where the right and the left diagonal of this square matrix… Read More
Given a Linked List. The task is to traverse the Linked List from middle to left-right order using recursion.For Example:   If the given Linked List… Read More
Given an array of integers arr[], the task is to print a list of all the peaks and another list of all the troughs present… Read More
Given a linked list. The task is to remove the Nth node from the end of the linked list. Examples: Input : 1->2->3->4->5 , N… Read More
Given an array a of size N. The task is to find the maximum sum of array possible by dividing the array into three segments… Read More
Given a linked list and an integer N, the task is to delete the Nth node from the end of the given linked list. Examples:… Read More
Given a Binary Search Tree, the task is to find the node with minimum value. Examples: Input: Output: 4 Recommended: Please try your approach on… Read More
Given a linked list, the task is to find the balanced node in a linked list. A balanced node is a node where the sum… Read More
Given a square matrix mat[][] of size n * n. The task is to print all the elements which lie on the super-diagonal of the… Read More
Given a square matrix mat[][] of size n * n. The task is to print all the elements which lie on the sub-diagonal of the… Read More
Given a linked list. The task is to count the number of duplicate nodes in the linked list. Examples: Input: 5 -> 7 -> 5… Read More
Given two linked list of the same size, the task is to create a new linked list using those linked lists. The condition is that… Read More
Given two linked list of equal sizes, the task is to create new linked list using those linked lists where at every step, the maximum… Read More