Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# Traversal of tree with k jumps allowed between nodes of same height

Consider a tree with n nodes and root. You can jump from one node to any other node on the same height a maximum of k times on total jumps. Certain nodes of the tree ...

# Find last unique URL from long list of URLs in single traversal

Given a very long list of URLs, find out last unique URL. Only one traversal of all URLs is allowed. Examples: Input: https://www.geeksforgeeks.org http://quiz.geeksf...

# General Tree (Each node can have arbitrary number of children) Level Order Traversal

Given a generic tree, perform a Level order traversal and print all of its nodes Input : 10 / / 2 34 56 100 ...

# Move all zeroes to end of array Set-2 (Using single traversal)

Given an array of n numbers. The problem is to move all the 0&#x2019;s to the end of the array while maintaining the order of the other elements. Only single traversa...

# Construct BST from given preorder traversal Set 1

Given preorder traversal of a binary search tree, construct the BST. For example, if the given traversal is {10, 5, 1, 7, 40, 50}, then the output should be root of f...

# Construct BST from given preorder traversal Set 2

Given preorder traversal of a binary search tree, construct the BST. For example, if the given traversal is {10, 5, 1, 7, 40, 50}, then the output should be root of f...

# Construct BST from its given level order traversal

Construct the BST (Binary Search Tree) from its given level order traversal. Examples: Input : arr[] = {7, 4, 12, 3, 6, 8, 1, 5, 10} Output : BST: 7 ...

# Check if the given array can represent Level Order Traversal of Binary Search Tree

Given an array of size n. The problem is to check whether the given array can represent the level order traversal of a Binary Search Tree or not. Examples: Input : ar...

# Inorder Non-threaded Binary Tree Traversal without Recursion or Stack

We have discussed Thread based Morris Traversal. Can we do inorder traversal without threads if we have parent pointers available to us? Input: Root of Below Tree [E...

# Tree Traversals (Inorder, Preorder and Postorder)

Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways. Fo...