Occurrence of the longest substring of capital

Assignment Help Programming Languages
Reference no: EM13693788

Question: Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.

For example:

    ? XabXXXXXxxxXXXXXyyXX     position=4 length=5

If there are no Xs in the input string, print "no Xs".

You have to satisfy the requirements specific in the instruction.

Reference no: EM13693788

Questions Cloud

Cost-benefit analysis : The average annual cost to the company of a manager is $162,000, whereas no managerial professionals cost $121,000 a year on average; both figures include overhead.
Design a recursive algorithm to implement : Design a recursive algorithm to implement this specification. That is, the body of FindLast should contain a recursive call FindLast(A,..,..).
Write an application that stores 100 movies : Write an application that stores 100 movies and displays them by category.  The user can enter any of the categories to display the films in the list that match the category.
Write the equations describing the electrode reactions : Problem- Write the equations describing the electrode reactions and the net cell reaction for this electrochemical cell containing copper and silver
Occurrence of the longest substring of capital : Input a string. Output the starting position and length of the first occurrence of the longest substring of capital Xs in that string. The first letter is in position 1.
Draw a picture of the gel : Problem- The restriction enzyme, Xho1, cuts phage (lambda) DNA at position 33,498. Draw a picture of the gel you will see if it is used as the mystery enzyme in the experiment.
Calculate the ph after koh addition : Problem- A buffer is prepared from 0.25 mol benzoic acid and 0.15 mol sodium benzoate in 500 mL solution. a. What is the pH of the buffer? b. If 6.2 g of KOH are added to the buffer will the capacity be exceeded? c. Calculate the pH after KOH addi..
Write a program that creates a file called grades.txt : Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade.
Calculate the percent riboflavin in a 50 mg multivitamin : Determine the volume of Solution #2 that is needed to make 25.00 mL of 2ppm solution. Calculate the percent riboflavin (to 3 significant figures) in a 50 mg multivitamin that was dissolved in 250 mL of 0.02 M acetic acid (assume density of acetic ..

Reviews

Write a Review

Programming Languages Questions & Answers

  Create program which calculate distance travelled by boat

Create a program which calculate distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river.

  Program to give and take advice on program writing

Write down the program which gives and takes advice on program writing. Program starts by writing the piece of advice to screen and asking user to type in different advice.

  Program to display only unique values which user entered

Program to display only the unique values which the user entered. Give for the "worst case" in which all 20 numbers are different. use smallest possible array to solve this problem.

  What will happen if the order of thenbspcatchnbspblocks is

q1. what runtimeexception if any will the following program throw?class exception1 public static void mainstring

  Write function template to return number of element in queue

Add operation queueCount to class queueType (the array implementation of queues), to return number of elements in the queue. Write down the definition of function template.

  Technique of multiplexed switching of analogue signals

Explain briefly from what you notice about the digital output values in (a) why a digital output value of an A/D converter is rarely the exact same digital value as the analogue input value.

  Create a glossary generator

Prompt the user to enter a word, return its definition and scrabble score (or output "not valid in scrabble")

  Expression whose value is distance between two point

a structured type with two fields, x and y, both of type double-- write an expression whose value is the distance between the two point represented by p1 and p2.

  Design a program to amount save for budgeted

Design a program that asks the user to enter the amount that he or she has budgeted for a month. (For example: $2,000.00). A loop should then prompt the user to enter each of his or her expenses for the month

  Create program which computes person-s bmi

Create a program which computes a person's body mass index? Design a modular program that calculates and display a person's body mass index (BMI).

  Conduct experimental study on free and damped vibrations

Conduct an experimental study on the free and damped vibrations - Prepare a report with made for an experiment

  Write statement to determine whether array elements are full

Write the statements needed to determine whether any of the the array elements are null or refer to the empty String. Set the variable hasEmpty to true if any elements are null or empty-- otherwise set it to false.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd