Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Tree Accolite Amazon

Lowest Common Ancestor in a Binary Tree Set 1

Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor. Following is definition of LCA from W...
Backtracking Matrix Amazon

Rat in a Maze Backtracking-2

We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...
Dynamic Programming Expedia LIS

Maximum length subsequence with difference between adjacent elements as either 0 or 1

Given an array of n integers. The problem is to find maximum length of the subsequence with difference between adjacent elements as either 0 or 1. Examples: Input : a...
Geometric Mathematical Amazon

Find if two rectangles overlap

Given two rectangles, find if the given two rectangles overlap or not. Note that a rectangle can be represented by two coordinates, top left and bottom right. So mai...
Tree Expedia Expedia

Foldable Binary Trees

Question: Given a binary tree, find out if the tree can be folded or not. A tree can be folded if left and right subtrees of the tree are structure wise mirror image ...
Tree Accolite Amazon

Lowest Common Ancestor in a Binary Tree Set 1

Given a binary tree (not a binary search tree) and two values say n1 and n2, write a program to find the least common ancestor. Following is definition of LCA from W...
Backtracking Matrix Amazon

Rat in a Maze Backtracking-2

We have discussed Backtracking and Knight’s tour problem in Set 1. Let us discuss Rat in a Maze as another example problem that can be solved using Backtracki...

Subscribe to Our Newsletter