×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

trie

A collection of 24 posts

C Programming

Trie in C Programming Language (using struct)

To represent a Trie data structure in C, you can use a structure and pointers to create the nodes of the Trie.

Anuj Dharme
Java

Trie in Java with OOPS Concepts

In this article at OpenGenus, we have explored the basics of Trie data structure and how to implement Trie in Java Programming Language from scratch using OOP concepts.

Aadarsh Kumar Singh Aadarsh Kumar Singh
C++

Trie in C++ using OOP concepts

In this article, we'll look at how the Trie data structure is implemented in C++ using principles of object-oriented programming (OOP).

RAHUL ARORA
trie

Lexicographic sorting using Trie

Lexicographic sorting is a way of sorting a set of strings based on their alphabetical order We can also say that the order in which those words appear in a dictionary.

Aswin Shailajan
Python

Trie in Python using OOP concepts

In this article, we have implemented Trie Data Structure in Python Programming Language using OOP concepts. We have explained the implementation design step by step.

Akshaya Pillalamarri
Algorithms

Magic Dictionary Problem [Solved]

In this article we are going to discuss a famous Leetcode medium level problem called "Implement Magic Dictionary" problem. This will involve the concept of Hash Table/ Map and Tries.

Harshit Raj
trie

Top K Frequent Words

In this article, we will study about different approaches to solve the problem "Top K Frequent Words". This will involve the concept of Priority Queue, Trie and Bucket Sort.

Shruti Singh
trie

Dictionary using Trie

In this article, we will learn about the Trie data structure and its application in dictionary.

Suraj Kumar Suraj Kumar
Algorithms

First K maximum occurring words

In this article, we will understand the different approaches to return the first k maximum occurring words from a given array. It includes core Data Structures and Algorithm topics such as Arrays, HashMap, Sorting, Priority Queue and Heap, Trie, and Bucket sort.

Astha Jain Astha Jain
trie

Find word with maximum frequency using Trie

In this article, we will design an algorithm to Find word with maximum frequency using Trie Data Structure.

Pervez Nagi
Algorithms

Bottom up traversal of Trie

In this article, we have explained the algorithmic approach for Bottom up traversal of Trie.

Purvak Baliyan
Algorithms

Longest word with given prefix and suffix

You are given a list of words, a prefix, and a suffix. You have to find the longest word in the given word list that has a given prefix and suffix.

Gaurav Kumar
trie

Longest word in dictionary with all prefixes

Given a list of words ‘WORDLIST’, find the longest perfect word. A perfect word is a word in which all the possible prefixes are present in ‘WORDLIST’.

Gaurav Kumar
Time Complexity

Time and Space complexity of Trie

In this article, we will understand the Complexity analysis of various Trie operations. We have covered Time and Space Complexity of Trie for various cases like Best case, Average Case and Worst Case.

Sanjana Babu
Data Structures

Persistent Trie

In this article, we discuss the Trie data structure and how to make it persistent to solve various problems optimally.

Erick Lumunge
Algorithms

Longest Common Prefix

In this article, we are going to explore different approaches to find the longest common prefix between two strings. Same techniques can be applied to find the Longest Common Prefix for multiple strings.

Thompson Mina
Algorithms

Longest Common Suffix Problem

In this article, we will see how we can find the longest common suffix (i.e ending) that all the strings given to us have. We shall start with the brute-force approach for two strings. Following this, we will implement the Trie data structure to solve the problem for more than two strings.

J. Varun Iyer J. Varun Iyer
Algorithms

Maximum XOR of two numbers in an array using Trie

Given a list of numbers we need to identify a pair of numbers in the list such that the XOR of those numbers is the maximum possible over all the pairs.

Rohit Topi
Data Structures

Radix Tree [Compact version of Trie]

radix tree is a compact version of a trie. It takes advantage of this and will store multiple characters / string of text in an edge instead to reduce the number of extra edges and nodes needed.

Ethan Z. Booker
Algorithms

All Valid Word Breaks of a Sentence 【O(2^N) time complexity】

We are given with a valid sentence without any spaces and we are given with a dictionary of words. We need to print all the possible ways to break the sentence so that all the breaked words belongs to the dictionary.

Sadanand Vishwas Sadanand Vishwas
Data Structures

Y fast trie

Y-fast trie is a data structure used to store integers from a bounded domain. It has two data structures X fast trie and balanced binary search tree with the change being we operate on representative values r in X-fast tries, and the leaf nodes point to balanced binary search trees instead of values

Yash Aggarwal Yash Aggarwal
Data Structures

X-fast trie

X-fast trie is a data structure used to store integers from a bounded domain. It is a bitwise trie, i.e. a binary tree where each subtree stores values having binary representations with common prefix. It is a trie of hash tables and supports successor and predecessor operations in log log U time

Yash Aggarwal Yash Aggarwal
Data Structures

Trie data structure

A trie (digital tree, radix tree, prefix tree) is a kind of an ordered search tree data structure that is used to store a dynamic set or associative array where the keys are usually strings. Worst case search time complexity is Θ(key_length) and trie is widely used in real life applications

Vipul Gupta Vipul Gupta
Data Structures

Ternary Search Trees

Ternary Search Tree is a special type of trie data structure and is widely used as an low memory alternative to trie in a vast range of applications like spell check and near neighbor searching. The average case time complexity is O(log N) for look-up, insertion and deletion operation.

Aman Agarwal Aman Agarwal
OpenGenus IQ © 2025 All rights reserved ™
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship