Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Queue Recursion Stack

Level order traversal in spiral form

Write a function to print spiral order traversal of a tree. For below tree, function should print 1, 2, 3, 4, 5, 6, 7. Recommended: Please solve it on “PRAC...
Tree cpp-unordered_map Inorder Traversal

Construct Tree from given Inorder and Preorder traversals

Let us consider the below traversals: Inorder sequence: D B E A F C Preorder sequence: A B D E C F Recommended: Please solve it on “PRACTICE” first, be...
Tree Tree

Construct Special Binary Tree from given Inorder traversal

Given Inorder Traversal of a Special Binary Tree in which key of every node is greater than keys in left and right children, construct the Binary Tree and return root...
Tree Amazon Kritikal Solutions

Boundary Traversal of binary tree

Given a binary tree, print boundary nodes of the binary tree Anti-Clockwise starting from the root. For example, boundary traversal of the following tree is “2...
Binary Search Tree Stack Tree

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...
Tree Tree

Iterative Preorder Traversal

Given a Binary Tree, write an iterative function to print Preorder traversal of the given binary tree. Refer this for recursive preorder traversal of Binary Tree. To...
Tree Tree

Morris traversal for Preorder

Using Morris Traversal, we can traverse the tree without using stack and recursion. The algorithm for Preorder is almost similar to Morris traversal for Inorder. 1......
Advanced Computer Subject GBlog secure-coding

Path Traversal Attack and Prevention

A path traversal attack allows attackers to access directories that they should not be accessing, like config files or any other files/directories that may contains s...

Graph Traversals

123 Graph Traversals Please wait while the activity loads. If this activity does not load, ...
Dynamic Programming Matrix Dynamic Programming

Collect maximum points in a grid using two traversals

Given a matrix where every cell represents points. How to collect maximum points using two traversals under following conditions? Let the dimensions of given grid be ...

Subscribe to Our Newsletter