Given an array A[] of length N, the task is to find the maximum sum calculated by multiplying subsequence sum with its length and removing… Read More
Category Archives: Algorithms
Given a matrix mat[][] of size N * N, where mat[i][j] represents the time taken to reach from ith city to jth city. Also, given… Read More
Given an array arr[], the task is to find the maximum sum possible such that any subarray of the indices from [l, r] i.e all… Read More
Given an array, arr[], and an integer K, the task is to find the total number of ways in which we can divide the array… Read More
Given a string str, the task is to extract all the Email ID’s from the given string. Example: Input: “Please send your resumes to Hr@Iwillgetbacktoyou@gmail.com… Read More
Given N and K, the task is to form an array where each element represents the number of ways to reach each index i (1… Read More
Given an array arr[] of size N ( N is even ), the task is to construct an array B[] such that the sum of… Read More
A Disjoint set union is an algorithm that is used to manage a collection of disjoint sets. A disjoint set is a set in which… Read More
Given an array vals[] of size N, where each element represents the value of each node (0 ≤ index ≤ N-1) and an array Edges[]… Read More
Given an array arr[] with size N, the task is to find the minimum possible sum of distinct elements over all the prefixes of the… Read More
The Damerau–Levenshtein distance is a measure of the similarity between two strings, which takes into account the number of insertion, deletion, substitution, and transposition operations… Read More
Modifying Exceptions During Runtime: Suppose there is a Registration Form. If you got exceptional data in the form like in the place of Name you… Read More
Given binary array A[] of size N, the task is to find the minimum cost to remove all elements of the array by performing moves… Read More
Given an array arr[] of size N that denotes the type of an element, and another time array time[] of size N where time[i] denotes… Read More
Given numbers T, A, and B, the task is to find the greatest number less than equal to T formed by the sum of any… Read More