## Left-Child Right-Sibling Representation of Tree

An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. The tree starts at the root node.… Read More »

An n-ary tree in computer science is a collection of nodes normally represented hierarchically in the following fashion. The tree starts at the root node.… Read More »

We are given an array of integers and a range, we need to find whether the subarray which falls in this range has values in… Read More »

Given a string of lower alphabetic characters, find K-th character in a string formed by substrings (of given string) when concatenated in sorted form. Examples:… Read More »

Given a string which contains lower alphabetic characters, we need to find out such a substring of this string whose product of length and frequency… Read More »

BK Tree or Burkhard Keller Tree is a data structure that is used to perform spell check based on Edit Distance (Levenshtein distance) concept. BK… Read More »

We encounter various problems like Maximum length palindrome in a string, number of palindromic substrings and many more interesting problems on palindromic substrings . Mostly… Read More »

Given a dictionary find out if given word can be made by two words in the dictionary. Note: Words in the dictionary must be unique… Read More »

Given a list of words, find if any of the two words can be joined to form a palindrome. Examples: Input : list[] = {“geekf”,… Read More »

Given a dictionary and a character array, print all valid words that are possible using characters from the array. Examples: Input : Dict – {“go”,”bat”,”me”,”eat”,”goal”,… Read More »

We have seen various methods with different Time Complexities to calculate LCA in n-ary tree:- Method 1 : Naive Method ( by calculating root to… Read More »

A ScapeGoat tree is a self-balancing Binary Search Tree like AVL Tree, Red-Black Tree, Splay Tree, ..etc. Search time is O(Log n) in worst case.… Read More »

Given a dictionary, a method to do lookup in dictionary and a M x N board where every cell has one character. Find all possible… Read More »

Prerequisite : Segment Tree Persistency in Data Structure Segment Tree is itself a great data structure that comes into play in many cases. In this… Read More »

Prerequisite : Introduction and DFS The task is to find LCA of two given nodes in a tree (not necessarily a Binary Tree). In previous… Read More »

Given a string S, and two type of queries. Type 1: 1 L x, Indicates update Lth index of string S by x character. Type… Read More »