Word Break Problem – Using Trie Data Structure
Given a dictionary of words, determine if a given string can be segmented into a space-separated sequence of one or more dictionary words.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven a dictionary of words, determine if a given string can be segmented into a space-separated sequence of one or more dictionary words.
Given a dictionary of words where each word follows a CamelCase notation, find all words in it that matches a given pattern of all uppercase characters.
Given a positive number n, find all combinations of 2×n elements such that every element from 1 to n appears exactly twice and the distance between its two appearances is exactly equal to the value of the element.
Quicksort performance can be boosted in several ways. In this post, we will cover a few of them.
A Treap data structure is basically a combination of a binary search tree and a heap.
Given a string and a pattern containing wildcard characters, i.e., * and ?’, where ? can match to any single character in the string and * can match to any number of characters including zero characters, design an efficient algorithm to find if the pattern matches with the complete string or not.
The longest increasing subsequence problem is to find a subsequence of a given sequence in which the subsequence’s elements are in sorted order, lowest to highest, and in which the subsequence is as long as possible. This subsequence is not necessarily contiguous or unique.
Write an efficient algorithm to print a binary tree structure in standard output.
Generate all permutations of a string in Java.
Given an integer array, find the maximum sum of subsequence where the subsequence contains no adjacent elements.
Given an integer array, find all distinct combinations of a given length k, where the repetition of elements is allowed.
Given an integer array, find all distinct combinations of a given length k. The program should print only distinct combinations.