100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Examen

CSC148 Exam Study Questions 2024 with Complete solutions (A Graded)

Puntuación
-
Vendido
-
Páginas
7
Grado
A+
Subido en
07-09-2024
Escrito en
2024/2025

CSC148 Exam Study Questions 2024 with Complete solutions (A Graded)

Institución
CSC148
Grado
CSC148









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
CSC148
Grado
CSC148

Información del documento

Subido en
7 de septiembre de 2024
Número de páginas
7
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

Vista previa del contenido

CSC148 Exam Study Questions 2024 with
Complete solutions (A Graded)

Huffman's algorithm - ANSWER used to organize the file compression by giving short codes to
frequent symbols and longer codes to infrequent symbols


byte - ANSWER an integer in the range 0-255


searching with sorted vs unsorted list - ANSWER unsorted : O(n)
sorted: log2(n) ( log(n)



general tree with n items insert, delete. - ANSWER insert can be fast, if you insert as a child of
the root - O(1), search and delete can be slow since you might need to check every item in the
tree - o(n) in the worst case



search efficiency in a BST: - ANSWER BST with n nodes has height logn and insert/delete/search
time of O(n) , if BST is balanced then it takes logn node accesses.



Python interpreter, java compiler, and pycharm and pythonTA - ANSWER -a program that
runs python code


-java compiler is a program that turns java code into a sequence of "Primitive instructions"
Pycharm and pythonTA are programs that analyze Python code and report potential problems

, Expressions vs statements - ANSWER Expression is a unit of code that, when evaluated
produces a single value, a statement is more general: evaluating a statement can produce a
value, or has some other effect.


EVERY expression is a statement, but not vice-versa!


Variable environment - ANSWER a map from variable names to values



Evaluating an Assign and consolidation - ANSWER name.evaluate-look up the variable name in
the current environment


evaluating an assign mutates the env


Assign.evaluate add a new variable binding to the current environment (mutates env)


Module - ANSWER a class that represents an entire Python program. Its
body is a list of statements



Sorting and the times, bubble, selection, insertion, quick, radix, merge? - ANSWER bubble ->
n^2, selection also n^2, insertion too, n^2



How does quicksort work? - ANSWER randomly select a pivot point, split list such that all
elements to the left are lower than P and all to the right are higher, then repeat the same
idea for the two partitions



Complexities of quicksort runtime - ANSWER If we always choose a pivot thats around median,
then the two partitians are about equal and the runtime is (nlog(n)), if we choose one that's
always min/max we get O(n^2),

Conoce al vendedor

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
KenAli West Virginia University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
84
Miembro desde
1 año
Número de seguidores
5
Documentos
17177
Última venta
1 semana hace

2.9

19 reseñas

5
4
4
4
3
4
2
0
1
7

Recientemente visto por ti

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