Prabhdeep Singh has Published 129 Articles

Sort a string without altering the position of vowels

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 09:02:29

Sorting a string means we have to arrange a given string either in an ascending or descending order or any given order. In this problem given a string 'str' of size n. Our aim is to sort the given string without altering means without changing the position of vowels present ... Read More

Maximum Number of 0s Placed Consecutively at the Start and End in any Rotation of a Binary String

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 09:00:04

Binary string means the string contains only two types of char either 1 or 0. It is known as base 2. In this problem, we have given a binary string str and also the size of the string 'n'. Our task is to find the maximum number of zeros places ... Read More

C++ Program for Left Rotation and Right Rotation of a String

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 08:56:40

Rotation means we have to shift each character forward or backward direction. In the case of forward, the last character is forwarded to the index 0 also known as right rotation. In the case of backward first character at index 0 is backward to the last index also known as ... Read More

Java Program for Left Rotation and Right Rotation of a String

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 08:55:14

Rotation means we have to shift each character either in a forward direction or backward direction. Forward direction means right rotation (Or anticlockwise) and backward direction means left rotation (Or clockwise). In this problem, we have given a string of characters of size n and integer d. Here d is ... Read More

Maximize partitions in a given Binary String having the same ratio of 0s and 1s

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:57:36

A binary string is a string that contains only zeros and ones as the different types of characters. We have given a binary string and the task is to divide it into some number of partitions (possibly zero) where each partition contains an equal ratio of zero and one. We ... Read More

Maximum Occurring Character in a Linked List

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:54:23

We have given a singly linked list of characters, and our task is to print the character which occurs the maximum time in the linked list. If the multiple characters have the same count of occurring then print the character which comes in the last. The Singly-linked list is a ... Read More

Check if the summation of two words is equal to the target word

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:52:42

We will be given three strings str1, str2, and str3 in this problem of the same or different lengths and we have to find whether the sum of the first two strings is equal to the third or not. Each of the strings contains elements less than ‘k’ which means ... Read More

Lexicographically smallest string formed repeatedly deleting a character from substring ‘10’

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:45:51

Lexicographically smallest string means among the set of strings is the string which appears first in the dictionary order is known as a lexicographically smallest string. We will be given a binary string (that contains only two different types of characters 0 and 1) and we can delete character ‘1’ ... Read More

Maximum Pairs of Bracket Sequences which can be concatenated to form a Regular Bracket Sequence

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:44:06

Regular Bracket Sequence means a string that contains the parentheses of both opening and closing types and results in properly closed brackets. The given sequence may be properly symmetrical and maybe not. In this problem, we are given a list of string that contains the bracket sequences and we have ... Read More

Maximum count of 0s between two 1s in the given range for Q queries

Prabhdeep Singh

Prabhdeep Singh

Updated on 17-May-2023 14:41:15

A binary string is a string that only contains the zeroes and ones as the different characters in them. We are given a binary string and an array of a given length that will contain the pairs. Each pair defines the range, and in that range, we have to return ... Read More

1 2 3 4 5 ... 13 Next
Advertisements