# Tag Archives: TRIE

## Minimum Word BreakNovember 17, 2017

Given a string s, break s such that every substring of the partition can be found in the dictionary.Return the minimum break needed. Examples: Given… Read More »

## Maximum possible XOR of every element in an array with another arrayOctober 4, 2017

Two arrays A and B consisting of N elements are given. The task is to compute the maximum possible XOR of every element in array… Read More »

## Most frequent word in an array of stringsOctober 1, 2017

Given an array of words find the most occurring word in it Examples: Input : arr[] = {“geeks”, “for”, “geeks”, “a”, “portal”, “to”, “learn”, “can”,… Read More »

## Trie memory optimization using hash mapSeptember 26, 2017

We introduced and discussed an implementation in below post. Trie | (Insert and Search) – GeeksforGeeks The implementation used in above post uses an array… Read More »

## Word Break Problem | (Trie solution)September 10, 2017

Given an input string and a dictionary of words, find out if the input string can be segmented into a space-separated sequence of dictionary words.… Read More »

## Sorting array of strings (or words) using Trie

Given an array of strings, print them in alphabetical (dictionary) order. If there are duplicates in input array, we need to print them only once.… Read More »

## Find duplicate rows in a binary matrixSeptember 5, 2017

Given a binary matrix whose elements are only 0 and 1, we need to print the rows which are duplicate of rows which are already… Read More »

## Frequency of a string in an array of stringsSeptember 4, 2017

You are given a collection of strings and a list of queries. For every query there is a string given. We need to print the… Read More »

## Counting the number of words in a TrieAugust 17, 2017

A Trie is used to store dictionary words so that they can be searched efficiently and prefix search can be done. The task is to… Read More »

## Subarray with XOR less than kAugust 6, 2017

Given an array of n numbers and a number k. You have to write a program to find the number of subarrays with xor less… Read More »

## Trie | (Display Content)July 26, 2017

Trie is an efficient information retrieval data structure. In our previous post on trie we have discussed about basics of trie and how to insert… Read More »

## Find maximum XOR of given integer in a stream of integersJune 28, 2017

You are given a number of queries Q and each query will be of the following types: Query 1 : add(x) This means add x… Read More »

## Auto-complete feature using TrieJune 7, 2017

We are given a Trie with a set of strings stored in it. Now the user types in a prefix of his search query, we… Read More »

## Word formation using concatenation of two dictionary wordsMarch 17, 2017

Given a dictionary find out if given word can be made by two words in the dictionary. Note: Words in the dictionary must be unique… Read More »

## Palindrome pair in an array of words (or strings)March 15, 2017

Given a list of words, find if any of the two words can be joined to form a palindrome. Examples: Input : list[] = {“geekf”,… Read More »