## Binary Tree to Binary Search Tree Conversion using STL set

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure… Read More »

- Find the smallest positive number missing from an unsorted array | Set 3
- Find the lexicographically smallest sequence which can be formed by re-arranging elements of second array
- Print combinations of distinct numbers which add up to give sum N
- Distinct pairs from given arrays (a[i], b[j]) such that (a[i] + b[j]) is a Fibonacci number
- Total distinct pairs from two arrays such that second number can be obtained by inverting bits of first
- Greatest number less than equal to B that can be formed from the digits of A
- Distinct state codes that appear in a string as contiguous sub-strings
- Find the Jaccard Index and Jaccard Distance between the two given sets

Given a Binary Tree, convert it to a Binary Search Tree. The conversion must be done in such a way that keeps the original structure… Read More »

Assign value by a pair of {} to a container filter_none edit close play_arrow link brightness_4 code // Lots of programmers write code // like… Read More »

Given a tree, print the level order traversal in sorted order. Examples : Input : 7 / \ 6 5 / \ / \ 4… Read More »

Sets are a type of associative containers in which each element has to be unique, because the value of the element identifies it. The value… Read More »

Sets are containers that store unique elements following a specific order. Internally, the elements in a set are always sorted. Sets are typically implemented as… Read More »

Given a list of permutations of any word. Find the missing permutation from the list of permutations. Examples: Input : Permutation_given[] = {“ABCD”, “CABD”, “ACDB”,… Read More »

Given an array and an integer K. We need to find the maximum of every segment of length K which has no duplicates in that… Read More »

You are given an array of n integer and an integer K. Find the number of total unordered pairs {i, j} such that absolute value… Read More »

Inversion Count for an array indicates – how far (or close) the array is from being sorted. If array is already sorted then inversion count… Read More »