• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 9 páginas
Examen

CPSC 350 Final Exam Graded A+

Document preview thumbnail
Vista previa 2 fuera de 9 páginas

CPSC 350 Final Exam Graded A+

Vista previa del contenido

CPSC 350 Final Exam Graded A+
Array benefits - ANSWER-It is better and convenient way of storing the data of same
datatype with same size. It allows us to store known number of elements in it.

Array Big-O runtimes (access, insert, search, delete) - ANSWER-access = O(1)
insert = O(n)
search = O(n)
delete = o(n)

Array disadvantages - ANSWER-- is a static Data structure
-We must know in advance that how many elements are to be stored in array. Only
elements of same data types can be stored in an array. We cannot store elements of
multiple data types in a single array.

Arrays - ANSWER-a collection of items stored in a contiguous memory location and
addressed using one or more indices

AVL trees - ANSWER-- Adelson-Velskii & Landis: Any pair of sibling nodes have a
height difference of at most
- not commonly used in industry

Balanced/Unbalanced BST's - ANSWER-- We will say that a tree is height-balanced if
the heights of the left and right subtrees of each node are within 1
- A tree is perfectly height-balanced if the left and right subtrees of any node are the
same height

Big-O for Linked List (access, insert, search, delete) - ANSWER-access = O(n)
insert = O(1)
search = O(n)
delete = o(1)

Binary Search Tree BST - ANSWER-- Each internal node has at most two children
- Values smaller than the root, left subtree
- Values greater than the root, right subtree
- Each node (vertex) must have exactly one path (edge) to another node
If not, then it's a graph
- The number of children of a given node is called a degree
- Is allows for efficient sorting and searching of data.
- log(N)

Breadth-first search - ANSWER-- We examine all nodes at the same level of the tree
before moving on to the next level
- Finding shortest paths

, - Used for disconverting spanning trees
- Requires more memory than DFS
- uses a Queue
- divides graph into levels
- better for broader graphs

BST advantages - ANSWER-- BST has fast insertion and deletion when balanced
- very efficient

BST disadvantages - ANSWER-- shape of tree determines on insertion and can be
degenerated
- search takes a long time

BubbleSort - ANSWER-- compares 2 numbers
- if the one on the left is bigger, swap
- performance, pretty lousy O(N^2)
- best O(n)
- use when you don't have access to internet and not a large data set

circular Queues - ANSWER-The used memory locations, when free are reused so no
memory is leaked

ex: round Robin schedulers

Depth-first search - ANSWER-- useful for finding whether there is a path from one
vertex to another and whether or not the graph is connected
- in terms of running time, DFS is an efficient method for transversing a graph
- use stack
- checks graph for cycles
- traverses deep into graph by visiting children nodes before sibling/neighbor nodes
- requires less memory

difference between Graphs and trees - ANSWER-- trees are a type of graph
- no loops in trees
- numerous rules in spelling out connections in trees, graph has not rules dictating
connections among nodes

Dijkstra's algorithm - ANSWER-- finds the optimal path from a source vertex to and
endpoint,
Single source
- graph can be a directed or undirected weight graph
- graph needs to have a nonnegative weight on every edge
- used in Google Maps

Dijkstra's algorithm disadvantages - ANSWER-- It do blind search so wastes lot of time
while processing.

Información del documento

Subido en
6 de marzo de 2025
Número de páginas
9
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$11.79

¿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

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.
CLOUNDLite
4.0
(131)
Vendido
665
Seguidores
389
Artículos
12415
Última venta
5 días hace




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