## Minimum number of swaps to make two binary string equal

Given two binary strings of equal length, the task is to find the minimum number of swaps to make them equal. Swapping between two characters… 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 two binary strings of equal length, the task is to find the minimum number of swaps to make them equal. Swapping between two characters… Read More »

Given an ancestor matrix mat[n][n] where the ancestor matrix is defined as below. mat[i][j] = 1 if i is ancestor of j mat[i][j] = 0,… Read More »

Given a value N and K, the task is to generate N-bits Gray Code starting from the value K. Examples: Input: N = 2, K… Read More »

Given a N x M matrix where N is the number of rows and M is the number of columns in the given matrix and… Read More »

Given a Zero matrix of N x N size, the task is to find the numbers of cells containing even numbers after performing Q queries.… Read More »

Given a number N, the task is to build N blocks from 1 block by performing following operation: Double the number of blocks present in… Read More »

Given a binary string, the task is to find whether all the digits of the string can be made equal i.e either 0 or 1… Read More »

Given N binary strings b1, b2, b3…. bn. The task is to find the maximum number of binary strings that you can make palindromic by… Read More »

Given an array of length N, the task is to find minimum operation required to make all elements in the array equal. Operation is as… Read More »

Given the size of a binary array consisting of 0’s only as n and an integer m which is the number of flips allowed from… Read More »

Given an array arr of N elements, the task is to find the length of the smallest subarray of the given array that contains at… Read More »

Given a 2D array of size N containing distinct height of people standing in a queue, and a number corresponding to each person (P) that… Read More »

Given a string s, the task is to find the number of possible non-empty sequences of letters that can be made. Examples: Input: “AAB” Output:… Read More »

Given an integer N which is the number of villagers who need to cross a river but there is only one boat on which a… Read More »

Given a sequence A1, A2, A3, … An of distinct integers. The task is to find the last 2 remaining elements after removing the median… Read More »