# Strings

Strings

### Minimize replacements to make any two of the three given strings equal

Given three strings A, B, and C of equal length, the task is to find the minimum number of replacement…

### Print all Balanced Brackets Strings that can be formed by replacing wild card ‘?’

import java.io.*;import java.util.*;class Main {            static void print(char ch[])    {        for (Character c : ch) {            System.out.print(c);        }        System.out.println();    }            static boolean check(char ch[])    {                Stack S = new Stack();                        if…

### Maximize 0s to be flipped in given Binary array such that there are at least K 0s between two 1s

Given a binary array arr[] and an integer K, the task is to count the maximum number of 0’s that…

### Minimum number of adjacent swaps to reverse a String

Given a string s. The task is to minimize the number of adjacent swaps required to reverse the string. Examples:Attention reader!…

### Count of 3 length strings using given characters containing at least 2 different characters

Given three integers a, b and c which denotes the frequencies of three different characters ‘A‘, ‘B‘, and ‘C‘ respectively,…

### Count of Binary Strings of length at most N with set bit count as multiple of K

Given two integers N and K, the task is to find the count of binary strings of at most N…

### Find minimum value expression by inserting addition or multiplication operator between digits of given number

Given string str that contains only digits, the task is to return an expression by inserting the ‘+’ or ‘*’…

### Minimum adjacent swaps required to get Kth smallest number greater than given number

#include using namespace std;  void minSwapsKthLargest(string str, int k){        string res = str;              for (int i = 0; i < k; i++) {        next_permutation(            str.begin(),…