Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
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...
Dynamic Programming Google IBM

Word Break Problem DP-32

Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words. See following exam...
Dynamic Programming Mathematical Matrix

Count all possible paths from top left to bottom right of a mXn matrix

The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each cell you can either move only to...
Arrays Dynamic Programming Amazon

Maximum sum such that no two elements are adjacent

Given an array of positive numbers, find the maximum sum of a subsequence with the constraint that no 2 numbers in the sequence should be adjacent in the array. So 3 ...
Arrays Heap Searching

k largest(or smallest) elements in an array added Min Heap method

Question: Write an efficient program for printing k largest elements in an array. Elements in array can be in any order. For example, if given array is [1, 23, 12, 9...
Arrays Sorting Adobe

Sort an array of 0s, 1s and 2s

Given an array A[] consisting 0s, 1s and 2s, write a function that sorts A[]. The functions should put all 0s first, then all 1s and all 2s in last. Examples: Input :...
Backtracking MakeMyTrip Walmart

Find Maximum number possible by doing at-most K swaps

Given a positive integer, find maximum integer possible by doing at-most K swap operations on its digits. Examples: Input: M = 254, K = 1 Output: 524 Input: M = 254,...
Dynamic Programming Mathematical Adobe

Minimum number of jumps to reach end

Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a function to return the minimum n...
Arrays Dynamic Programming Amazon

Find maximum possible stolen value from houses

There are n houses build in a line, each of which contains some value in it. A thief is going to steal the maximal value of these houses, but he can’t steal in...
Dynamic Programming Mathematical Matrix

Count all possible paths from top left to bottom right of a mXn matrix

The problem is to count all the possible paths from top left to bottom right of a mXn matrix with the constraints that from each cell you can either move only to...

Subscribe to Our Newsletter