Answered step by step
Verified Expert Solution
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
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started