Skip to content

Category Archives: Data Structures

A cyclic graph is defined as a graph that contains at least one cycle which is a path that begins and ends at the same… Read More
A directed graph is defined as a type of graph where the edges have a direction associated with them. Example of Directed Graph Characteristics of… Read More
A circular doubly linked list is defined as a circular linked list in which each node has two links connecting it to the previous node… Read More
Given two strings S1 and S2, which consists of uppercase alphabets. Find the shortest string str which consists of # and uppercase letters, where the… Read More
B + tree is a variation of the B-tree data structure. In a B + tree, data pointers are stored only at the leaf nodes… Read More
There are N jobs and the start and finish times of the jobs are given in arrays start[] and end[] respectively. Each job requires one… Read More
Given a sorted array A[] of length N. For each i(0 ≤ i ≤ n-1), you have to make all the elements of the array… Read More
Geek is extremely punctual but today even he is not feeling like doing his homework assignment. He must start doing it immediately in order to… Read More
Given a binary tree and a non negative integer k. Find and return the Kth maximum level sum in a binary tree. If the levels… Read More
Given a string s of length N containing only lowercase English letters and an integer K, the task is to find all distinct substrings of… Read More
Given two integers N (N ≥ 1) and K (K ≥ 1), where N denotes the number of petrol pumps from 1 to N and… Read More
Given a Binary Search Tree with unique node values and a target value. Find the node whose data is equal to the target and return… Read More
Given an undirected graph with N vertices and M edges. The task for this problem is to check whether each connected component of the given… Read More
Given 2 sorted arrays Ar1 and Ar2 of size N each. Merge the given arrays and find the sum of the two middle elements of… Read More
A hash function is a mathematical function that takes input data (also known as the message or pre-image) and produces a fixed-length output called a… Read More