Disha Gupta has Published 10 Articles

Program to find the sum of series 1*2*3 + 2*3*4+ 3*4*5 + . . . + n*(n+1)*(n+2)

Disha Gupta

Disha Gupta

Updated on 05-Feb-2024 18:23:29

398 Views

The sum of the series is the value of all terms in the given series added together in a particular pattern. Here given pattern is in the form of the: ∑ (n*(n+1)*(n+2)) as (n*(n+1)*(n+2)) is the last term in the given pattern. The following article discusses 3 approaches in detail ... Read More

Count of substrings with the frequency of at most one character as Odd

Disha Gupta

Disha Gupta

Updated on 05-Feb-2024 18:19:37

164 Views

Substrings are the subsets or sequences of contiguous characters of a string. Now, in this problem, we need to find the number of substrings with the frequency of at most one character as odd. Let us see how we should proceed to solve this problem. Let’s try to understand this ... Read More

Find the next number by adding natural numbers in order on alternating indices from last

Disha Gupta

Disha Gupta

Updated on 05-Feb-2024 18:16:08

59 Views

A numerical string is used to store a value of a number if we want to store a huge valued integer. As we know, we can not store a number greater than 32 bits in the computer with its datatype as int. So to avoid the overflowing condition, in this ... Read More

Maximize the String value by assigning values in the range [1, 26] to each character

Disha Gupta

Disha Gupta

Updated on 05-Feb-2024 18:14:07

118 Views

There are 26 total different alphabets exist in the English language. If we want to change the alphabet characters into numerical values then we need to assign the alphabet, values between 1 to 26 only. Now, in this problem, we need to Maximize the String value by assigning values ... Read More

The maximum length of string formed by concatenation having an even frequency of each character

Disha Gupta

Disha Gupta

Updated on 05-Feb-2024 18:11:07

44 Views

Concatenation is an operator which is used to join one or more than one string to originate a new string which would be a combination of strings that were used to generate it with the help of concatenation. In the following article, we will take the uppercase letters only in ... Read More

Sort the string as per the ASCII values of the characters

Disha Gupta

Disha Gupta

Updated on 22-Jan-2024 17:39:06

965 Views

ASCII Values ASCII (American Standard Code for Information Interchange) is the most common character encoding format for text data in computers and on the internet. In standard ASCII-encoded data, there are unique values for 256 alphabetic, numeric, or special additional characters and control codes. Problem Statement Now, in this problem, ... Read More

Minimize hamming distance in Binary String by setting only one K size substring bits

Disha Gupta

Disha Gupta

Updated on 22-Jan-2024 13:18:23

74 Views

Hamming distance between two strings of equal length is the number of all the positions at which a different value exists at the corresponding position of the other string. We can understand this with an example given below − S = “ramanisgoing” T = “dishaisgoing” Here, 5 is the ... Read More

Lexicographically largest possible by merging two strings by adding one character at a time

Disha Gupta

Disha Gupta

Updated on 22-Jan-2024 12:49:45

165 Views

Lexicographic means the algorithm by using which we can arrange given words in alphabetical order, the same concept which is used in dictionaries. The largest possible string that we would get by merging two strings taking one-character element at a time so that the order is lexicographic can be obtained ... Read More

Check if two arrays of strings are equal by performing swapping operations

Disha Gupta

Disha Gupta

Updated on 22-Jan-2024 11:50:18

144 Views

The arrays of strings are a 2-dimensional array that stores characters in it. In C++ language we have an inbuilt function, with syntax − Syntax swap (first_datatype, second_datatype) which is used to perform swap operations on two elements, that is, exchange the values they carry. In the ... Read More

Find the last remaining Character in the Binary String according to the given conditions

Disha Gupta

Disha Gupta

Updated on 23-Oct-2023 15:43:53

28 Views

A binary string is a string that only has two characters, usually the numbers 0 and 1, and it represents a series of binary digits. Problem Statement Now, in this problem, we are given a binary string comprising zeros and ones. We have two conditions to keep in mind while ... Read More

1
Advertisements