Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

Ch. 4 Computer Science 201 Data Structures & Algorithms Exam Questions with Answers.

Puntuación
-
Vendido
-
Páginas
3
Grado
A+
Subido en
12-04-2025
Escrito en
2024/2025

Ch. 4 Computer Science 201: Data Structures & Algorithms Exam Questions with Answers The ingredients in an algorithm are called: - Correct Answers: Inputs Instead of a list of steps, algorithms can be written using: - Correct Answers: Flowcharts with arrows to illustrate the journey A programming algorithm is like: - Correct Answers: A recipe An algorithm always leads to a(n): - Correct Answers: Solution An algorithm is written down as: - Correct Answers: A list of steps What is one major drawback of experimental analysis? - Correct Answers: Implementation of programs What are asymptotic notations? - Correct Answers: Notations that allow us to analyze an algorithm's running time by identifying its behavior as the input size for the algorithm increases. What is NOT an asymptotic notation? - Correct Answers: β If f(n) is the function then O(f(n)) = { g(n) : there exists c 0 and n0 such that f(n) ≤ c.g(n) for all n n0. } is true for which of the following symptotic notations ? - Correct Answers: Big Oh An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an _____ is implemented. - Correct Answers: output; equivalent program Kara's code includes a binary search operation. Which of the following functions would be optimal to test the execution time of this function? - Correct Answers: Log n An algorithm tests the air pressure on a slope at different altitudes. Given that the pressure depends on the altitude, what is the optimal algorithmic function to use? - Correct Answers: Linear In a linear function, the time taken is _____ if the size of the input is doubled. - Correct Answers: doubled Out of a random bunch of last years' holiday greeting cards, Clara wants to find the one her mother sent her. The optimal algorithm to use will be _____. - Correct Answers: N-log-N Brian has an algorithm to read through an array that contains numbers 1 through 26 and convert each number to an English alphabet. He runs the algorithm a number of times with no changes to the size of the array and no changes to the task done. The function to use is: _____ - Correct Answers: f(n) = c What is the time complexity of the following ? i=0;while(in){ j=i;while(jn && ji+5){ /* code */j++;}i=j; } - Correct Answers: O(N) If one for loop runs with size N and the other with size M and the loops follow a linear function, what is the expected time complexity? - Correct Answers: O(M+N) What is space complexity? - Correct Answers: Amount of storage an algorithm needs to work If an algorithm runs in quadratic time, what is its time complexity using Big-O ? - Correct Answers: O(N2) For a linear function, what would be its time complexity? - Correct Answers: O(N) Which method is used to prove a mathematical statement true, by assuming the negation of it to also be true? - Correct Answers: contrapositive In algorithm analysis, space complexity describes _____. - Correct Answers: the total memory space consumed In loop variants, the relationship between the variables _____. - Correct Answers: is the same before and after the loops Why is it necessary to analyze an algorithm? - Correct Answers: All of the above Contrapositive and contradiction fall under which category of algorithm analysis? - Correct Answers: Contra Attack

Mostrar más Leer menos
Institución
Data Structures And Algorithm Analysis In C+
Grado
Data Structures and Algorithm Analysis in C+

Vista previa del contenido

Ch. 4 Computer Science 201:
Data Structures & Algorithms
Exam Questions with Answers
The ingredients in an algorithm are called: - Correct Answers: Inputs



Instead of a list of steps, algorithms can be written using: - Correct Answers: Flowcharts with arrows to
illustrate the journey



A programming algorithm is like: - Correct Answers: A recipe



An algorithm always leads to a(n): - Correct Answers: Solution



An algorithm is written down as: - Correct Answers: A list of steps



What is one major drawback of experimental analysis? - Correct Answers: Implementation of programs



What are asymptotic notations? - Correct Answers: Notations that allow us to analyze an algorithm's
running time by identifying its behavior as the input size for the algorithm increases.



What is NOT an asymptotic notation? - Correct Answers: β



If f(n) is the function then O(f(n)) = { g(n) : there exists c > 0 and n0 such that f(n) ≤ c.g(n) for all n > n0. }
is true for which of the following symptotic notations ? - Correct Answers: Big Oh



An experimental analysis depends on the _____ results, so an algorithm cannot be measured unless an
_____ is implemented. - Correct Answers: output; equivalent program



Kara's code includes a binary search operation. Which of the following functions would be optimal to
test the execution time of this function? - Correct Answers: Log n

Escuela, estudio y materia

Institución
Data Structures and Algorithm Analysis in C+
Grado
Data Structures and Algorithm Analysis in C+

Información del documento

Subido en
12 de abril de 2025
Número de páginas
3
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.49
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor
Seller avatar
SAVEMYEXAMS

Documento también disponible en un lote

Thumbnail
Package deal
Data Structures and Algorithm Analysis Bundle Compilation Grade A+
-
15 2025
$ 31.81 Más información

Conoce al vendedor

Seller avatar
SAVEMYEXAMS stuvia
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
2
Miembro desde
1 año
Número de seguidores
2
Documentos
1594
Última venta
10 meses hace
SAVEMYEXAMS

Assignments, Case Studies, Research, Essay writing service, Questions and Answers, Discussions etc. for students who want to see results twice as fast. I have done papers of various topics and complexities. I am punctual and always submit work on-deadline. I write engaging and informative content on all subjects. Send me your research papers, case studies, psychology papers, etc, and I’ll do them to the best of my abilities. Writing is my passion when it comes to academic work. I’ve got a good sense of structure and enjoy finding interesting ways to deliver information in any given paper. I love impressing clients with my work, and I am very punctual about deadlines. Send me your assignment and I’ll take it to the next level. I strive for my content to be of the highest quality. Your wishes come first— send me your requirements and I’ll make a piece of work with fresh ideas, consistent structure, and following the academic formatting rules. For every student you refer to me with an order that is completed and paid transparently, I will do one assignment for you, free of charge!!!!!!!!!!!!

Lee mas Leer menos
0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes