Tutorialspoint.dev
Welcome To Tutorialspoint.dev
Officially launched 18th May 2019
Heap Mathematical Adobe

Median in a stream of integers (running integers)

Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no duplicates. For example, let...
Arrays Mathematical Sorting

Given a number, find the next smallest palindrome

Given a number, find the next smallest palindrome larger than this number. For example, if the input number is “2 3 5 4 5”, the output should be &#x20...
Dynamic Programming Strings Google

Find if a string is interleaved of two other strings DP-33

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all charac...
Hash Linked List Python

Find the first non-repeating character from a stream of characters

Given a stream of characters, find the first non-repeating character from stream. You need to tell the first non-repeating character in O(1) time at any moment. If we...
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 Mathematical Sorting

Given a number, find the next smallest palindrome

Given a number, find the next smallest palindrome larger than this number. For example, if the input number is “2 3 5 4 5”, the output should be &#x20...
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 Strings Google

Find if a string is interleaved of two other strings DP-33

Given three strings A, B and C. Write a function that checks whether C is an interleaving of A and B. C is said to be interleaving A and B, if it contains all charac...
Dynamic Programming Mathematical combionatrics

Efficient program to print all prime factors of a given number

Given a number n, write an efficient function to print all prime factors of n. For example, if the input number is 12, then output should be “2 2 3”. An...
Arrays Sorting inversion

Find Surpasser Count of each element in array

A surpasser of an element of an array is a greater element to its right, therefore x[j] is a surpasser of x[i] if i < j and x[i] < x[j]. The surpasser count of ...

Subscribe to Our Newsletter