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

Write a Program to Find the Maximum Depth or Height of a Tree

Given a binary tree, find height of it. Height of empty tree is 0 and height of below tree is 3. Example Tree Recommended: Please solve it on “PRACTICE&#x20...
Binary Search Tree Tree Accolite

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. • The left subtree of a node contains only nodes with...
Arrays Strings CBSE - Class 11

Write a program to reverse an array or string

Given an array (or string), the task is to reverse the array/string. Examples : Input : arr[] = {1, 2, 3} Output : arr[] = {3, 2, 1} Input : arr[] = {4, 5, 1, 2} ...
Dynamic Programming Mathematical GE

Sieve of Eratosthenes

Given a number n, print all primes smaller than or equal to n. It is also given that n is a small number. Example: Input : n =10 Output : 2 3 5 7 Input : n = 20 ...
Arrays Randomized Searching

K’th Smallest/Largest Element in Unsorted Array Set 2 (Expected Linear Time)

We recommend reading following post as a prerequisite of this post. K’th Smallest/Largest Element in Unsorted Array | Set 1 Given an array and a number k where...
Arrays Heap Searching

K’th Smallest/Largest Element in Unsorted Array Set 1

Given an array and a number k where k is smaller than size of array, we need to find the k’th smallest element in the given array. It is given that ll array ...
Arrays Searching ABCO

K’th Smallest/Largest Element in Unsorted Array Set 3 (Worst Case Linear Time)

We recommend reading following posts as a prerequisite of this post. K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Eleme...
Advanced Data Structure Arrays Strings

Longest Common Prefix using Trie

Given a set of strings, find the longest common prefix. Input : {“geeksforgeeks”, “geeks”, “geek”, “geezer”} ...
Arrays Strings CBSE - Class 11

Write a program to reverse an array or string

Given an array (or string), the task is to reverse the array/string. Examples : Input : arr[] = {1, 2, 3} Output : arr[] = {3, 2, 1} Input : arr[] = {4, 5, 1, 2} ...
Arrays Searching ABCO

K’th Smallest/Largest Element in Unsorted Array Set 3 (Worst Case Linear Time)

We recommend reading following posts as a prerequisite of this post. K’th Smallest/Largest Element in Unsorted Array | Set 1 K’th Smallest/Largest Eleme...

Subscribe to Our Newsletter