subject

Efficiency Analysis. For each problem given below, do the following: 1. Create an algorithm in pseudocode to solve the problem. 2. Identify the factors that would influence the running time of your algorithm. For example, if your algorithm is to search an array the factor that influences the running time is the array size. Assign names (such as n) to each factor. 3. Count the operations performed by the algorithm. Express the count as a function of the factors you identified in Step 2. To do that, identify the basic operations of the algorithm. There is no need count every statement separately only the ones that will influence the running time. 4. Describe the best case scenario for the algorithm and derive the big O. 5. Describe the worst case scenario for the algorithm and derive the big 0. The problems are: 1. Determine if two arrays have no elements in common. 2. Counting the total number of characters that have a duplicate within a string, including spaces. (i. e. "gigi the gato" would result in 9 (g*3 + 1*2 + 1*2+" "*2) 3. Finding a row where every entry is 'x' in a 2-D array.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 23.06.2019 05:20
What did creator markus “notch" persson initially call his game
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
You know the right answer?
Efficiency Analysis. For each problem given below, do the following: 1. Create an algorithm in pseud...
Questions
question
Mathematics, 21.07.2019 11:50
question
Mathematics, 21.07.2019 11:50
Questions on the website: 13722360