Prabhdeep Singh has Published 197 Articles

Count of possible distinct Binary strings after replacing 11 with 0

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 13:54:22

37 Views

A binary string is a string that contains only two types of different characters zeroes and ones. We can replace a substring '11' of the given string with another string '0' and we have to find the number of different possible strings we can get from it. We are going ... Read More

Minimum characters to be replaced in Ternary string to remove all palindromic substrings for Q queries

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:51:57

72 Views

A palindromic string is a string that is equal to its reverse string. We are given a string that contains ‘0’, ‘1’, and ‘2’ and an array Q of length N and each index of the given array indicates a range in the form of pairs. We have to find ... Read More

Maximize given function by selecting equal length substrings from given Binary Strings

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:50:29

102 Views

Two binary strings str1 and str2 of the same length are given and we have to maximize a given function value by choosing the substrings from the given strings of equal length. The given function is such that − fun(str1, str2) = (len(substring))/(2^xor(sub1, sub2)). Here, len(substring) is the length of ... Read More

Minimum number of adjacent swaps to reverse a String

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:42:32

253 Views

A string str is given and we can swap only adjacent characters to make the string reverse. We have to find the number of minimum moves required to make the string reverse just by swapping the adjacent characters. We will implement two approaches to find the required solution with the ... Read More

Minimum count of prefixes and suffixes of a string required to form a given string

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:40:31

208 Views

Prefixes are the substring from the given string that starts from the zeroth index and can go up to length 1 to the size of the string. Similarly, the suffix is the substring of any length 1 to the size of the string and ends at the last index. We ... Read More

Encrypt the string

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:29:46

744 Views

Encryption is the technique to change the data by using some techniques or certain steps so it changes to another information or the previous information cannot be gathered from it directly. For encryption, we have to follow certain steps that are fixed for a particular type of encryption. In this ... Read More

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

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:27:26

48 Views

Three integers are given to us ‘a’, ‘b’, and ‘c’ represents the frequency of the three different characters ‘A’, ‘B’, and ‘C’. We have to find the number of different strings that can be formed by using these characters and there must be at least two different characters present in ... Read More

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

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:11:07

59 Views

A Binary Array is a special type of array that only contains the numbers 0 and 1. In this problem, we have given a binary array and integer K. Our task is to count the maximum number of 0’s that can be flipped to 1 in a given binary array ... Read More

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

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:08:53

101 Views

Balanced Brackets mean if we have a string of brackets then each open bracket has a corresponding close bracket and the pair of brackets is properly nested. The size of the string should be ab even number. In this problem we have given a string of the brackets that also ... Read More

Check if the end of the given Binary string can be reached by choosing the jump value in between the given range

Prabhdeep Singh

Prabhdeep Singh

Updated on 26-Jul-2023 10:00:09

27 Views

A binary string is a string that contains only two different types of characters that are 0 and 1. We are given a binary string and two integers L and the R. We can make the jump of size between ‘L’ and ‘R’ length both inclusive and only from ... Read More

Previous 1 ... 3 4 5 6 7 ... 20 Next
Advertisements