Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 7 Given two strings, each 15 characters long, what is the maximum possible number of times the for-do loop in steps 2 and 3

image text in transcribed
image text in transcribed
QUESTION 7 Given two strings, each 15 characters long, what is the maximum possible number of times the for-do loop in steps 2 and 3 are executed? 1. Input strings 11,...,1, and y.. .n and s 2. For i = 1 to n do 2.1. If I = then 2.1.1. Return "String one contains s." 3. For i = 1 to n do 3.1. If is then 3.1.1. Return "String two contains s." 4. Return "Neither string contains." a) For-do loop in step 2 b) For-do loop in step 3 QUESTION 13 Given the following input determine the number of times the for-do loops in step 2 and step 3 are executed. (Input your answers as numbers.) string 1 = 738537858357 string2 =429068321021 n=12 s=1 1. Input strings ...., and ...... and 8 2. For i = 1 to n do 2.1. If I then 2.1.1. Return "String one contains." 3. For i=1 to n do 3.1. If - then 3.1.1. Return "String two contains." 4. Return "Neither string contains." a) For-do loop in step 2 b) For-do loop in step 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

foothill cs f 0 0 3 a

Answered: 1 week ago

Question

6. Effectively perform the managers role in career management.

Answered: 1 week ago