Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# A program to check if a binary tree is BST or not

A binary search tree (BST) is a node based binary tree data structure which has the following properties. &#x2022; The left subtree of a node contains only nodes with...

# Find k-th smallest element in BST (Order Statistics in BST)

Given root of binary search tree and K as input, find K-th smallest element in BST. For example, in the following BST, if k = 3, then output should be 10, and if k =...

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

# Floor and Ceil from a BST

There are numerous applications we need to find floor (ceil) value of a key in a binary search tree or sorted array. For example, consider designing memory&#xA0;manag...

# Convert a BST to a Binary Tree such that sum of all greater keys is added to every key

Given a Binary Search Tree (BST), convert it to a Binary Tree such that every key of the original BST is changed to key plus sum of all greater keys in BST. Example...

# Substring in C++

In C++, std::substr() is a predefined function used for string handling. string.h is the header file required for string functions. This function takes two values po...

# Abstraction in C++

Data abstraction is one of the most essential and important feature of object oriented programming in C++. Abstraction means displaying only essential information an...

# Pure Virtual Functions and Abstract Classes in C++

Sometimes implementation of all function cannot be provided in a base class because we don&#x2019;t know the implementation. Such a class is called abstract class. ...

# Longest Palindromic Substring Set 1

Given a string, find the longest substring which is palindrome. For example, if the given string is &#x201C;forgeeksskeegfor&#x201D;, the output should be &#x201C;g...

# Longest Common Substring DP-29

Given two strings &#x2018;X&#x2019; and &#x2018;Y&#x2019;, find the length of the longest common substring. Examples : Input : X = &#x201C;GeeksforGeeks&#x201D;, ...