A trie is a special tree that can compactly store strings. Tries are an extremely special and useful data-structure that are based on the prefix of a string. They are used to represent the “Retrieval” of data and thus the name Trie. Here’s a trie that stores “David”, “Maria”, and “Mario”: supported operations: 1: Insert 2:Search
Tag Archives: dataStructure
Graph and its representations
A graph is a data structure that consists of the following two components:1. A finite set of vertices also called as nodes. 2: A finite set of order pair from (u,v) called as edge. The following two are the most commonly used representations of a graph.1. Adjacency Matrix ( N *N matrix where N is number of …
Double Link List
The limitations of singly linked lists The singly linked list (SLL) is a linear data structure comprising of nodes chained together in a single direction. Each node contains a data member holding useful information, and a pointer to the next node. The problem with this structure is that it only allows us to traverse forward, i.e., we cannot iterate back …