Prabhdeep Singh has Published 197 Articles

Minimum K such that every substring of length at least K contains a character c

Prabhdeep Singh

Prabhdeep Singh

Updated on 25-Jul-2023 15:21:05

96 Views

A string is given in this problem and we have to find a minimum length ‘k’ such that all the substrings of the given string of length k contains at least one common character. We will see three approaches for this problem, one the naive approach to find all the ... Read More

Kth Character After Replacing Each Character of String by its Frequency Exactly X Times

Prabhdeep Singh

Prabhdeep Singh

Updated on 25-Jul-2023 15:18:22

73 Views

In this problem we have given a string ‘str’, integer K, and integer X. That string ‘str’ contains only integers in the range between 1 to 9. We have to perform an operation over the string exactly X times. Operation is that every time we have to replace a character ... Read More

Convert given Strings into T by replacing characters in between strings any number of times

Prabhdeep Singh

Prabhdeep Singh

Updated on 25-Jul-2023 15:16:19

45 Views

Convert string means we have to make the same as a given string on the basis of a given condition. In this problem, we have given an array of strings ‘arr’ and string ‘T’ of size ‘M’. our task is to check if is it possible to make all the ... Read More

JavaScript Program to Find Minimum Insertions to Form a Palindrome

Prabhdeep Singh

Prabhdeep Singh

Updated on 12-Jul-2023 10:51:42

101 Views

We are given a string and we have to find the minimum number of different character that we need to insert in the given string at any place so that the final string will be palindrome. A palindrome is a string that is just equal to the reverse of it. ... Read More

JavaScript Program to Find Longest Common Prefix Using Word by Word Matching

Prabhdeep Singh

Prabhdeep Singh

Updated on 12-Jul-2023 10:08:00

188 Views

Prefixes are the substrings that start from the zeroth index of the given string and can be of any size from 1 to the complete length of the string. We are given a set of strings and we have to find the common prefix among all of them in the ... Read More

Python Program for Converting Roman Numerals to Decimal Lying Between 1 to 3999

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 21:34:23

251 Views

Roman numerals are known as the characters used in an arrangement of number notation based on the pre-Roman Roman system. All major symbols are covered in the section below. In this problem, we are given a string of Roman numerals and our task is to convert Roman numerals to decimals ... Read More

Karatsuba Algorithm for Fast Multiplication of Large Decimal Numbers Represented as Strings

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 21:20:07

229 Views

We are not able to store the large decimal numbers in normal data types such as the int or even in long long, so we store them in the string. When we multiply two integers represented in the form of a string it takes a lot of time more specifically ... Read More

PHP Program for Converting Roman Numerals to Decimal Lying Between 1 to 3999

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 18:08:03

127 Views

The characters used in an arrangement of numeric notation based on the pre-Roman Roman system are known as Roman numerals. All major symbols are covered in the section below. In this problem, we are given a string of Roman numerals and our task is to convert Roman numerals to decimals ... Read More

Python Program To Write Your Own atoi()

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 17:08:47

189 Views

We are given a string that may represent a number and if it is a valid number then we have to convert it into an integer using the Python programming language. atoi() function is used in C programming language and used to convert the string which is passed as ... Read More

C Program to Find Minimum Insertions to Form a Palindrome

Prabhdeep Singh

Prabhdeep Singh

Updated on 11-Jul-2023 16:57:21

245 Views

A palindrome is a string that is just equal to the reverse of it. We are given a string and we have to find the minimum number of insertions of any characters required to make the given string as the palindrome. We will see the three approaches: first recursive approach, ... Read More

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