Find first `k` maximum occurring words in a given set of strings
Given a huge set of words with duplicates present and a positive integer k, find the first k–maximum occurring words in it.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedGiven a huge set of words with duplicates present and a positive integer k, find the first k–maximum occurring words in it.
Given a dictionary of words, determine if a given string can be segmented into a space-separated sequence of one or more dictionary words.
Implement insert, search, and delete operations on Trie data structure. Assume that the input consists of only lowercase letters a–z.
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.
Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. This post covers the C++ implementation of the Trie data structure, which supports insertion, deletion, and search operations.
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.