## K Dimensional Tree | Set 1 (Search and Insert)

A K-D Tree(also called as K-Dimensional Tree) is a binary search tree where data in each node is a K-Dimensional point in space. In short,… Read More »

## Ukkonen’s Suffix Tree Construction – Part 2

In Ukkonen’s Suffix Tree Construction – Part 1, we have seen high level Ukkonen’s Algorithm. This 2nd part is continuation of Part 1. Please go… Read More »

## Ukkonen’s Suffix Tree Construction – Part 1

Suffix Tree is very useful in numerous string processing and computational biology problems. Many books and e-resources talk about it theoretically and in few places,… Read More »

## Pattern Searching using a Trie of all Suffixes

Problem Statement: Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] in txt[].… Read More »

## Data Structure for Dictionary and Spell Checker?

Which data structure can be used for efficiently building a word dictionary and Spell Checker? The answer depends upon the functionalists required in Spell Checker… Read More »

## Suffix Array | Set 2 (nLogn Algorithm)

A suffix array is a sorted array of all suffixes of a given string. The definition is similar to Suffix Tree which is compressed trie… Read More »

## Red-Black Tree | Set 3 (Delete)

We have discussed following topics on Red-Black tree in previous posts. We strongly recommend to refer following post as prerequisite of this post. Red-Black Tree… Read More »

## Interval Tree

Consider a situation where we have a set of intervals and we need following operations to be implemented efficiently. 1) Add an interval 2) Remove… Read More »

## Red-Black Tree | Set 2 (Insert)

In the previous post, we discussed introduction to Red-Black Trees. In this post, insertion is discussed. In AVL tree insertion, we used rotation as a… Read More »

## Red-Black Tree | Set 1 (Introduction)

Red-Black Tree is a self-balancing Binary Search Tree (BST) where every node follows following rules. 1) Every node has a color either red or black.… Read More »

## Suffix Array | Set 1 (Introduction)

We strongly recommend to read following post on suffix trees as a pre-requisite for this post. Pattern Searching | Set 8 (Suffix Tree Introduction) A… Read More »

## Splay Tree | Set 2 (Insert)

It is recommended to refer following post as prerequisite of this post. Splay Tree | Set 1 (Search) As discussed in the previous post, Splay… Read More »

## Splay Tree | Set 1 (Search)

The worst case time complexity of Binary Search Tree (BST) operations like search, delete, insert is O(n). The worst case occurs when the tree is… Read More »

## Self Organizing List | Set 1 (Introduction)

The worst case search time for a sorted linked list is O(n). With a Balanced Binary Search Tree, we can skip almost half of the… Read More »