Prabhdeep Singh has Published 188 Articles

Longest Substring with at most X 0s and Y 1s of given String

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 14:11:39

274 Views

A substring is the continuous sequence of the character from the given string which can be achieved by removing some character from the front and the end of the substring (possibly all or none). We are given a binary string and we have to find the length of the longest ... Read More

XOR of all substrings of a given Binary String

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 14:09:57

373 Views

A binary string is a string that contains only two different types of characters in it which are '0' and '1'. Substrings are strings that are formed by deleting some character from the given string from the beginning and from the ending (possibly zero or all). We are given a ... Read More

Minimum cost to delete characters from String A to remove any subsequence as String B

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 14:02:39

379 Views

We are given two strings string A and string B along with an array that represents the cost to delete the ith character of the given string A. We need to delete some characters of string A (possibly zero or none) with the minimum cost such that no subsequence of ... Read More

Transform string A into B by deleting characters from ends and reinserting at any position

Prabhdeep Singh

Prabhdeep Singh

Updated on 24-Aug-2023 13:56:43

137 Views

Anagram of a string means a string contains exact same characters as another string with the order of characters may vary from the original string, so we called that both strings are anagram of each other. Here we have given the two strings first and second which are anagrams of ... Read More

Count of possible distinct Binary strings after replacing 11 with 0

Prabhdeep Singh

Prabhdeep Singh

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

129 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

171 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

220 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

793 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

374 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

2K+ 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

Previous 1 ... 4 5 6 7 8 ... 19 Next
Advertisements