Prabhdeep Singh has Published 188 Articles

JavaScript Program To Write Your Own atoi()

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 11:42:17

230 Views

In C programming language we have a function that takes a single string or character array as the parameter and returns an integer that may be represented by the given string, if the current string is invalid then it reads only up to the first valid index and will return ... Read More

Sort a string without altering the position of vowels

Prabhdeep Singh

Prabhdeep Singh

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

573 Views

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

153 Views

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

1K+ Views

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

3K+ Views

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

173 Views

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

350 Views

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

136 Views

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

446 Views

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

256 Views

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

Previous 1 ... 7 8 9 10 11 ... 19 Next
Advertisements