Check given array of size n can represent BST of n levels or not

Problem Statement   Given an array with n elements, check given array of size n can represent BST of n levels or not. That is to check whether the binary search tree constructed using these n elements can represent a BST of n levels. Examples   arr[] = {10, 8, 6, 9, …

Read more

Reverse String Without Temporary Variable

Problem Statement   In the “Reverse String Without Temporary Variable” problem we have given a string “s”. Write a program to reverse this string without using any extra variable or space. Input Format   The first line containing the given string “s”. Output Format   Print the string which is reverse of the …

Read more

Longest Common Subsequence with Permutations

Problem Statement   In the “Longest Common Subsequence with Permutations” problem we have given two strings “s” and “t”. Find the longest string whose permutations are sub-sequences of the given two strings. Output longest must be sorted. Input Format   The first line containing a string “s”. The second line containing a …

Read more

Count of Triplets With Sum Less than Given Value

Problem Statement   We have given an array containing N number of elements. In the given array, Count the number of triplets with a sum less than the given value. Example   Input a[] = {1, 2, 3, 4, 5, 6, 7, 8} Sum = 10 Output 7 Possible triplets are : …

Read more

Ads Blocker Image Powered by Code Help Pro
Ads Blocker Detected!!!

This website does not work properly with AdBlock. We have detected that you are using extensions to block ads. Please disable Adblocker to view the content.

Refresh