A suffix tree is a data structure based on trie compression that stores all the suffixes of a given string. Apart from detecting patterns in… Read More
Tag Archives: Trie
Trie data structure is defined as a Tree based data structure that is used for storing some collection of strings and performing efficient search operations… Read More
Given a binary tree, where each node has a binary value, design an efficient algorithm to find the maximum XOR of any two node values… Read More
Given array A[] of strings of size N, the task for this problem is to print the Maximum Common prefix of string ‘i’ with other… Read More
What is Hash Table? An array that stores pointers to records corresponding to a given element. An entry in the hash table is NIL if… Read More
Given two arrays of strings containing words[] and queries[] having N and Q strings respectively, the task is to find the number of strings from… Read More
Given a string array arr[] of length N, the task is to find the maximum number of strings that share a common prefix of length… Read More
Trie data structure is defined as a Tree based data structure that is used for storing some collection of strings and performing efficient search operations… Read More
Trie(pronounced as “try”): Trie(also known as the digital tree or prefix tree) is a sorted and efficient tree-based special data structure that is used to… Read More
Given an integer K and an array arr[] of size N, the task is to choose two elements from the array in such a way… Read More
Given an array arr[] consisting of N strings and a string S if size M, the task is to find the lexicographically smallest string consisting… Read More
Given an array arr[] consisting of N strings and Q queries in form of two strings prefix and suffix, the task for each query is… Read More
Given an array arr[] consisting of N non-negative integers and a 2D array queries[][] consisting of queries of the type {X, M}, the task for… Read More
A trie is a data structure that stores strings like a tree data structure. The maximum number of children in a node is equal to… Read More
Given an array of strings str[] and a string key, the task is to check if the spelling of the key is correct or not.… Read More