Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

C949 Data Structures And Algorithms Questions Correctly Answered

Beoordeling
-
Verkocht
-
Pagina's
6
Cijfer
A+
Geüpload op
18-08-2024
Geschreven in
2024/2025

C949 Data Structures And Algorithms Record - Answer- Data structure that stores subitems, w/ names associated w/ each subitem Array - Answer- Data structure that stores an ordered list of items, w/ each item directly accessible by a positional index. Linked List - Answer- Data structure that stores an ordered list as nodes, each node stores data and has a pointer to the next node. Binary Tree - Answer- Data structure where each node stores data and has up to two children, left child and right child. Hash Table - Answer- Data structure that stores unordered items by mapping each item to a location in an array. Max Heap - Answer- Tree that maintains the simple property that a node's key is greater than or equal to a node's children key. Min Heap - Answer- A tree that maintains simple property that node's key is less than or equal to the node's children key. Graph - Answer- Represents connections among items. Consists of vertices and edges. Vertex represents an item on a graph. Edges represent a connection between two vertices. Abstract Data Type (ADT) - Answer- Data type described by predefined user operations. Does not say anything about the implementation. List - Answer- Common ADT for holding ordered data.Like an array. Can store ints, strings. Ex. nums = [5, 25, 30] Queue - Answer- ADT where items are inserted at the end of the queue and removed at the front of the queue. First in first out ADT. push - inserts items at the end of the queue pop - removes and returns the item at the front of the queue. Dictionary - Answer- Maps keys to values. Uses {}. The value can be number,string, or tuple. Can be any type. ex. players = { 'Lionel Messi': 10, 'Christiano Ronaldo': 7 } If else statement - Answer- Branching directs programs to execute either one group of statements or another.

Meer zien Lees minder
Instelling
C949 Data Structures And Algorithms
Vak
C949 Data Structures And Algorithms

Voorbeeld van de inhoud

C949 Data Structures And Algorithms
Record - Answer- Data structure that stores subitems, w/ names associated w/ each
subitem

Array - Answer- Data structure that stores an ordered list of items, w/ each item
directly accessible by a positional index.

Linked List - Answer- Data structure that stores an ordered list as nodes, each node
stores data and has a pointer to the next node.

Binary Tree - Answer- Data structure where each node stores data and has up to
two children, left child and right child.

Hash Table - Answer- Data structure that stores unordered items by mapping each
item to a location in an array.

Max Heap - Answer- Tree that maintains the simple property that a node's key is
greater than or equal to a node's children key.

Min Heap - Answer- A tree that maintains simple property that node's key is less
than or equal to the node's children key.

Graph - Answer- Represents connections among items. Consists of vertices and
edges. Vertex represents an item on a graph. Edges represent a connection
between two vertices.

Abstract Data Type (ADT) - Answer- Data type described by predefined user
operations. Does not say anything about the implementation.

List - Answer- Common ADT for holding ordered data.Like an array. Can store ints,
strings.
Ex. nums = [5, 25, 30]

Queue - Answer- ADT where items are inserted at the end of the queue and
removed at the front of the queue. First in first out ADT.
push - inserts items at the end of the queue
pop - removes and returns the item at the front of the queue.

Dictionary - Answer- Maps keys to values. Uses {}. The value can be number,string,
or tuple. Can be any type.
ex. players = {
'Lionel Messi': 10,
'Christiano Ronaldo': 7
}

If else statement - Answer- Branching directs programs to execute either one group
of statements or another.

, ex.
if expression:
# Statements to execute when expression is true
else:
# Statements to execute when expression is false
# Statements here execute after the if-else.

Multiple if else statements - Answer- elif used when two or more branches.
if age <= 15:
print('Too young for car insurance.')
price = 0
elif age <= 24:
price = age_16_to_24
elif age <= 39:
price = age_25_to_39
else:
price = age_40_up

Boolean Operators - Answer- In python must True / False must be capitalized.
Has 3 operators: and / or / not
(age > 16) and (age < 25)
(age > 16) or (days > 10)
not (days > 10)

Membership Operators - Answer- not , in
Cannot check for values but can check for keys.
ex.
my_dict = {'A': 1, 'B': 2, 'C': 3}

if 'B' in my_dict:
print("Found 'B'")
else:
print("'B' not found")

# Membership operator does not check values
if 3 in my_dict:
print('Found 3')
else:
print('3 not found')

reversed() - Answer- Iterates over a for loop backwards.
ex.
print('\nPrinting in reverse:')
for name in reversed(names):
print(name, '|', end=' ')

Function - Answer- Named series of statements. Invoking a function is called a
function call, which causes a function to execute.
Ex.

Geschreven voor

Instelling
C949 Data Structures And Algorithms
Vak
C949 Data Structures And Algorithms

Documentinformatie

Geüpload op
18 augustus 2024
Aantal pagina's
6
Geschreven in
2024/2025
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€9,79
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Freshy Oxford University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
59
Lid sinds
2 jaar
Aantal volgers
4
Documenten
6982
Laatst verkocht
3 weken geleden

3,6

10 beoordelingen

5
3
4
4
3
1
2
0
1
2

Populaire documenten

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Veelgestelde vragen