subject

Ques. Find the minimum number of operations to make all the characters in a string equal. Given:
You are given a string S of length N consisting of lowercase characters 'a' and 'b'. In one operation, you can select a character and make it equal to one of its adjacent characters. For example, if S = "aab", in one operation you can convert it to any of the following:
1. "aab": By changing the 1st character to the 2nd character.
2. "aab": By changing the 2nd character to the 1st character.
3. "abb": By changing the 2nd character to the 3rd character.
4. "aaa": By changing the 3rd character to the 2nd character.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
Ques. Find the minimum number of operations to make all the characters in a string equal. Given:
Questions
question
Mathematics, 02.07.2020 22:01
Questions on the website: 13722360