## Minimize cost to Swap two given Arrays

Given two arrays A[] and B[] both of size N consisting of distinct elements, the task is to find the minimum cost to swap two… Read More »

## Binary Synchronous Communication (BISYNC)

Binary Synchronous Communication (BISYNC) is basically a character or byte-oriented form of communication which means that the groups of bits or bytes are the important… Read More »

## Difference between Hierarchical and Flat routing protocol

1. Hierarchical Routing Protocol : Hierarchical Routing is the method of routing in networks that is based on hierarchical addressing. Most transmission control protocol, Internet… Read More »

## Perspective Projection and its Types

In Perspective Projection the center of projection is at finite distance from projection plane. This projection produces realistic views but does not preserve relative proportions… Read More »

## Test Coverage vs Code Coverage

Test Coverage and Code coverage are the most mainstream philosophies for estimating the viability of the code. In spite of the fact that these terms… Read More »

## Construct an Array of Strings having Longest Common Prefix specified by the given Array

Given an integer array arr[] of size N, the task is to construct an array consisting of N+1 strings of length N such that arr[i]… Read More »

## Minimize swaps required to maximize the count of elements replacing a greater element in an Array

Given an array A[], consisting of N elements, the task is to find the minimum number of swaps required such that array elements swapped to… Read More »

## Queries to find the Lower Bound of K from Prefix Sum Array with updates using Fenwick Tree

Given an array A[ ] consisting of non-negative integers and matrix Q[ ][ ] consisting of queries of the following two types: (1, l, val):… Read More »

## Count of Distinct Substrings occurring consecutively in a given String

Given a string str, the task is to find the number of distinct substrings that are placed consecutively in the given string.Examples:  Input: str =… Read More »

## Sum of bit differences for numbers from 0 to N | Set 2

Given a number N, the task is to calculate the total number of corresponding different bit in the binary representation for every consecutive number from… Read More »

## Mimimum number of leaves required to be removed from a Tree to satisfy the given condition

Given a Tree consisting of N vertices, rooted at vertex 1 and an array val[] representing the values assigned to each vertex, and an array… Read More »

## Farthest distance of a Node from each Node of a Tree

Given a Tree, the task is to find the farthest node from each node to another node in the given tree.Examples   Input:  Output: 2 3… Read More »

## Check if an Array is made up of Subarrays of continuous repetitions of every distinct element

Given an array arr[], consisting of N integers, the task is to check whether the entire array is only made up of subarrays such that… Read More »

## Size of all connected non-empty cells of a Matrix

Given a binary matrix mat[][], the task is to find the size of all possible non-empty connected cells. An empty cell is denoted by 0… Read More »

## Sum of Nodes and respective Neighbors on the path from root to a vertex V

Given a rooted tree having N vertices, an array values[ ], which represents the value assigned to each node, and a vertex V, the task… Read More »