# Trie

02

May

Maximum XOR value of two elements

Given an array of numbers find the maximum XOR value of two numbers in the array. Input Array = {12, 15, 5, 1, 7, 9, 8, 6, 10, 13}; Output = 15 (XOR of 5 and 10) 5 = 0101 10 = 1010 ——— XOR = 1111

01

May

Print all words in a Trie data structure

Given a collection of words stored in a Trie data structure, write a function that print all the words stored in it. For example, If the Trie is Then output should be: at ate bad bed beat beard

01

May

1

Trie data structure

String matching is a big research area and there are many data structure (eg. B-Tree, HashMap, Set) that help indexing of strings. There are also many algorithms used for string matching (like KMP, etc.) The major application of Trie data structure is in storing a dictionary (Collection of strings) such the searching for a word in dictionary become […]