Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

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

# 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 &#x201C;2 3 5 4 5&#x201D;, the output should be &#x20...

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

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

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

# 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 &#x201C;2 3 5 4 5&#x201D;, the output should be &#x20...

# 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&#x2019;t steal in...

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

# 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 &#x201C;2 2 3&#x201D;. An...

# 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 &lt; j and x[i] &lt; x[j]. The surpasser count of ...