100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

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

Beoordeling
-
Verkocht
-
Pagina's
7
Cijfer
A+
Geüpload op
07-09-2024
Geschreven in
2024/2025

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

Instelling
CSC148
Vak
CSC148









Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
CSC148
Vak
CSC148

Documentinformatie

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

Onderwerpen

Voorbeeld van de inhoud

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),
€11,20
Krijg toegang tot het volledige document:

100% tevredenheidsgarantie
Direct beschikbaar na je betaling
Lees online óf als PDF
Geen vaste maandelijkse kosten


Ook beschikbaar in voordeelbundel

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.
KenAli West Virginia University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
84
Lid sinds
1 jaar
Aantal volgers
5
Documenten
17177
Laatst verkocht
3 weken geleden

2,9

19 beoordelingen

5
4
4
4
3
4
2
0
1
7

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 Bancontact, iDeal of creditcard en download je PDF-document meteen.

Student with book image

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

Alisha Student

Veelgestelde vragen