## Least Common Ancestor of any number of nodes in Binary Tree

Given a binary tree (not a binary search tree) and any number of Key Nodes, the task is to find the least common ancestor of… Read More »

- Count of triplets that satisfy the given equation
- Write a function to get the intersection point of two Linked Lists | Set 2
- Print nodes having maximum and minimum degrees
- Number of triplets in array having subarray xor equal
- Minimum distance to visit all the nodes of an undirected weighted tree
- Widest Path Problem | Practical application of Dijkstra's Algorithm
- Find maximum count of duplicate nodes in a Binary Search Tree
- Twisted Tower of Hanoi Problem
- Minimum characters that are to be inserted such that no three consecutive characters are same
- Minimum value to be assigned to the elements so that sum becomes greater than initial sum
- Implementation of Non-Preemptive Shortest Job First using Priority Queue
- Sorting Algorithms Visualization | Selection Sort
- Queries to find the left-most given type integer in a binary array
- Van Emde Boas Tree | Set 4 | Deletion
- Difference between Linear and Non-linear Data Structures
- Skewed Binary Tree
- Extended Binary Tree

Given a binary tree (not a binary search tree) and any number of Key Nodes, the task is to find the least common ancestor of… Read More »

Given an array arr[] consisting of integers of length N and an integer K (1 ≤ k ≤ N), the task is to find the… Read More »

Given an integer array arr[], the task is to divide this array into two non-empty subsets such that the sum of the square of the… Read More »

Given an array arr[] of size N and an integer K. The task is to find the sum of f(S) over all the possible sets.… Read More »

Prerequisite: Segment tree and depth first search. In this article, an approach to convert an N-ary rooted tree( a tree with more than 2 children)… Read More »

Given an integer N, the task is to generate a random labelled tree of N node with (N – 1) edges without forming cycle. Note:… Read More »

Given a binary string str of length N and an integer K, the task is to find the minimum number of steps required to move… Read More »

Prerequisites: Genetic Algorithm, Travelling Salesman Problem In this article, a genetic algorithm is proposed to solve the travelling salesman problem. Genetic algorithms are heuristic search… Read More »

Given a small graph with N nodes and E edges, the task is to find the maximum clique in the given graph. A clique is… Read More »

DFA or Deterministic Finite Automata is a finite state machine which accepts a string(under some specific condition) if it reaches a final state, otherwise rejects… Read More »

Given an undirected graph with N nodes and E edges and a value K, the task is to print all set of nodes which form… Read More »

Given a number N, the task is to find the bitwise OR( | ) of all even number from 1 to N. Examples: Input: 2… Read More »

Prerequisites: Linked List, Graph Data Structure In this article, adding and removing a vertex is discussed in a given adjacency list representation. Let the Directed… Read More »

Given an integer N, the task is to find bitwise and (&) of all even number from 1 to N. Examples: Input: 2 Output: 2… Read More »

Given a Linked List which represents a sentence S such that each node represents a letter, the task is to reverse the sentence without reversing… Read More »