Find all interleaving of given strings
Find all interleavings of given strings that can be formed from all the characters of the first and second string where the order of characters is preserved.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedFind all interleavings of given strings that can be formed from all the characters of the first and second string where the order of characters is preserved.
Given a binary pattern containing ? wildcard character at a few positions, find all possible combinations of binary strings that can be formed by replacing the wildcard character by either 0 or 1.
Given a string, check if a repeated subsequence is present in it or not. The repeated subsequence should have a length of 2 or more.
Given a string, check if it is a rotated palindrome or not. For example, CBAABCD is a rotated palindrome as it is a rotation of palindrome ABCDCBA.
In previous post, we have introduced the heap data structure and covered heapify-up, push, heapify-down and pop operations. This article covers Java implementation of Priority Queue Data Structure (Max Heap and Min heap).
Given two integers, x and n, where n is non-negative, efficiently compute the power function pow(x, n) using Divide & Conquer.
Given an integer array, find the maximum sum among all subarrays possible using divide and conquer algorithm.
Given an array, find the peak element in it. A peak element is an element that is greater than its neighbors. There might be multiple peak elements in an array, and the solution should report any peak element.
Given a sorted binary array, efficiently find the total number of 1’s in it.
Given a sorted array of distinct non-negative integers, find the smallest missing element in it.
Given a string, print it backwards using recursion.
Given a circularly sorted integer array, find the total number of times the array is rotated. Assume there are no duplicates in the array, and the rotation is in the anti-clockwise direction.