# Category Archives: Algorithms

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
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