## Maximum number of multiples in an array before any element

Given an array arr[], the task is to find the maximum number of indices j < i such that (arr[j] % arr[i]) = 0 among… Read More »

- Live Classes for Data Structures and Algorithms: Interview Preparation Focused Course
- Playfair Cipher with Examples
- Count of triplets that satisfy the given equation
- Maximum Sequence Length | Collatz Conjecture
- Implementation of BFS using adjacency matrix
- Find a pair (n,r) in an integer array such that value of nPr is maximum
- Minimum increment or decrement operations required to make the array sorted
- Maximum XOR of Two Numbers in an Array
- Check if the rows of a binary matrix can be made unique by removing a single column
- Longest Increasing Subsequence using Longest Common Subsequence Algorithm
- Color all boxes in line such that every M consecutive boxes are unique
- Count the number of elements which are greater than any of element on right side of an array
- Count all substrings having character K
- Count of triples (A, B, C) where A*C is greater than B*B
- Minimum increment operations to make K elements equal
- Maximise the number of toys that can be purchased with amount K using min Heap
- Number of sub arrays with negative product
- Minimize the cost of partitioning an array into K groups
- Find a pair (n,r) in an integer array such that value of nCr is maximum
- Minimum distance to visit all the nodes of an undirected weighted tree
- Widest Path Problem | Practical application of Dijkstra's Algorithm
- Count the values greater than X in the modified array
- Maximize the Expression | Bit Manipulation
- Maximum non-attacking Knights that can be placed on an N*M Chessboard
- Sum of absolute differences of pairs from the given array that satisfy the given condition
- Expand the string according to the given conditions
- Comparing X^Y and Y^X for very large values of X and Y
- Implementation of DFS using adjacency matrix
- Find all numbers between range L to R such that sum of digit and sum of square of digit is prime
- Minimum number of additons to make the string balanced

Given an array arr[], the task is to find the maximum number of indices j < i such that (arr[j] % arr[i]) = 0 among… Read More »

Given an array of strings arr[], for every string in the array, print all possible combinations of strings that can be concatenated to make that… Read More »

Given an integer N, the task is to find three prime numbers X, Y and Z such that the sum of these three numbers is… Read More »

Given two sorted arrays arr1[] and arr2[], the task is to merge them in O(Nlog(N) + Mlog(M)) time with O(1) extra space into a sorted… Read More »

Given a binary tree (not a binary search tree) and any number of Key Nodes, the task is to find the least common ancestor of… Read More »

Given an array arr[] consisting of integers of length N and an integer K (1 ≤ k ≤ N), the task is to find the… Read More »

Given an integer array arr[], the task is to divide this array into two non-empty subsets such that the sum of the square of the… Read More »

Given an array arr[] of size N and an integer K. The task is to find the sum of f(S) over all the possible sets.… Read More »

Prerequisite: Segment tree and depth first search. In this article, an approach to convert an N-ary rooted tree( a tree with more than 2 children)… Read More »

Given an integer N, the task is to generate a random labelled tree of N node with (N – 1) edges without forming cycle. Note:… Read More »

Given a binary string str of length N and an integer K, the task is to find the minimum number of steps required to move… Read More »

Prerequisites: Genetic Algorithm, Travelling Salesman Problem In this article, a genetic algorithm is proposed to solve the travelling salesman problem. Genetic algorithms are heuristic search… Read More »

Prerequisites: Game Theory When the strategies from game theory are discussed, they are often mentioned from a player’s perspective. However, when the strategies are formed… Read More »

Given a small graph with N nodes and E edges, the task is to find the maximum clique in the given graph. A clique is… Read More »

DFA or Deterministic Finite Automata is a finite state machine which accepts a string(under some specific condition) if it reaches a final state, otherwise rejects… Read More »