## Find all cliques of size K in an undirected graph

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 »

## Find root of a number using Newton’s method

Given an integer N and a tolerance level L, the task is to find the square root of that number using Newton’s Method. Examples: Input:… Read More »

## ML | Linear Algebra Operations

Linear Algebra principles are crucial for understanding the concept behind Machine Learning, as well as Deep Learning, even many ideas struggle to create a precise… Read More »

## Minimum distance from a point to the line segment using Vectors

Given the coordinates of two endpoints A(x1, y1), B(x2, y2) of the line segment and coordinates of a point E(x, y); the task is to… Read More »

## Bitwise OR( | ) of all even number from 1 to N

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 »

## Print all maximal increasing contiguous sub-array in an array

Given an array arr[], the task is to find all the maximal contiguous increasing subarray in a given array. Examples: Input: arr[] = { 80,… Read More »

## Count positions such that all elements before it are greater

Given an array A[], the task is to find the number of positions i in the array such that all elements before A[i] are greater… Read More »

## Count possible combinations of pairs with adjacent elements from first N numbers

Given a number N, the task is to count all possible combinations of pairs formed using adjacent elements. Note: If an element exists already in… Read More »

## Find triplet with minimum sum

Given an array of distinct integers arr[]. The task is to find a triplet(a group of 3 elements) that has the minimum sum. Note: The… Read More »

## Count of non decreasing arrays of length N formed with values in range L to R

Given are integers N, L and R, the task is to count the number of non decreasing arrays of length N formed with values in… Read More »

## Arrange the array such that upon performing given operations an increasing order is obtained

Given an array arr[] of size N, the task is to print the arrangement of the array such that upon performing following operations on this… Read More »

## Minimum decrement operations to make Array elements equal by only decreasing K each time

Given an array arr[] of size N consisting of positive integers and an integer K, the task is to find the minimum number of steps… Read More »

## Length of longest Palindromic Subsequence of even length with no two adjacent characters same

Given a string str, the task is to find the length of the longest palindromic subsequence of even length with no two adjacent characters same… Read More »

## Count of Subsets of a given Set with element X present in it

Given an array arr[] of N unique positive integers and an element X, the tasks is to count the total possible number of subsets of… Read More »

## Count non decreasing subarrays of size N from N Natural numbers

Given are N natural numbers, the task is to find the count of the subarrays of size N that can be formed using elements from… Read More »