Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Define the term algorithm. What does the term \"boundary testing\" mean? If your

ID: 3770607 • Letter: D

Question

Define the term algorithm. What does the term "boundary testing" mean? If your program was doing calculations and took in values from 1 to 100, what values would you use to test with? Describe the things you look at when calculating Big O (what assumptions are made)? If G is a directed graph with 20 vertices, how many Boolean values will be needed to represent G using an adjacency matrix? I have a queue implemented with a linked list. There are two variables (front and rear). Write the pseducode for a "count" method. This method will return the number of items in the queue. Assume that this data is not stored anywhere else.

Explanation / Answer

3. An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time.

4. Boundary testing is testing for extreme values, where a value increment or decrement will make the algorithm either pass or fail. If the program is looking into values from 1 to 100, the boundary values are 1, 0, 100, 101 etc.

5. When calculating Big O, we'll look at the maximum number of operations(basic operations) required to run the algorithm.

6. If G is a directed graph with 20 vertices, to represent G using an adjacency matrix, we need an total of nxn values values, where n is the number of vertices. Therefore, in this case, it takes a total of 20 x 20 = 400 boolean values.

7. count = 0;

while(rear != front)

rear++; count++;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote