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

Data Structures & Algorithms Mid Term Exam Questions with Answers

Beoordeling
-
Verkocht
-
Pagina's
4
Cijfer
A+
Geüpload op
12-04-2025
Geschreven in
2024/2025

Data Structures & Algorithms Mid Term Exam Questions with Answers Array - Correct Answers: a fixed length collection that holds elements of similar types Array access elements by _______ - Correct Answers: index Array elements are stored ________ in memory - Correct Answers: sequentially Elements are ________ at the left-most empty index - Correct Answers: inserted Locating values in an unordered array requires a ___________________. - Correct Answers: sequential search Deleting unordered arrays 1. ______, 2. _____, 3. ________ - Correct Answers: search, remove, shift Ordered Arrays - Correct Answers: same structure as unordered, but elements are sorted in natural order Unordered array search - Correct Answers: search sequentially left to right Linear search - Correct Answers: accessing elements by index Ordered array search - Correct Answers: linear search, binary search Binary search - Correct Answers: split into halves, decide whether target is higher or lower, repeat cutting Binary vs Linear - Correct Answers: Binary more efficient depending on array size Big O Notation - Correct Answers: shorthand for an algorithm's complexity, or how it responds to changes to the size of its inputs Big O Linear - Correct Answers: O(n) Big O Binary - Correct Answers: O(log(n)) Bubble sort - Correct Answers: beginning at left, compares to object to the right, swap if left is greater than right, repeat. start again at value lower than first value Bubble sort peformance - Correct Answers: O(N^2) aka slow Selection sort - Correct Answers: start at left, find lowest value, move it to position 0, repeat process after moving one to the right Selection sort performance - Correct Answers: = bubble, but less N Insertion sort performance - Correct Answers: fastest & most complex Insertion Sort - Correct Answers: Select left-most unsorted, temp remove, start at i-1 moving left, compare removed to next element, if smaller, shift item in array right once. repeat until smaller element encountered, or position 0 reached. removed element is then inserted Invariants - Correct Answers: Conditions that remain unchanged as an algorithm proceeds Abstract data structure - Correct Answers: Ex: stacks & queues Concrete data structure - Correct Answers: Arrays (due to specific implementation) Stacks - Correct Answers: collection of elements that only allows access to the last element added Queues - Correct Answers: a sequential collection of items with first in first out retrieval Circular Queue - Correct Answers: same as queues, but wraps around Deque - Correct Answers: elements may be added and removed from either end Priority Queues - Correct Answers: abstract type similar to queue, but elements are assigned a priority How does a linked list work? - Correct Answers: An item that has a reference to the next link Linked list components - Correct Answers: insertFirst, deleteFirst, displayLink Double-ended lists - Correct Answers: same as linked list, but has both first and last fields Linked List Performance - Correct Answers: insertion/deleting @ beginning: O(1). Search, delete, insert, next to specific item: O(N) Doubly linked list - Correct Answers: Links have references to previous and next links Data type - Correct Answers: Referred to primitive types, now you can create your own data types (classes) Abstraction - Correct Answers: considered apart from detailed specification or implementation ADT Lists/Linear List - Correct Answers: group of items arranged in a linear order Sorted List - Correct Answers: Items arranged in sorted order by key value Solving a recursive problem - Correct Answers: Use the solution of the same problem with progressively simpler values Divide and conquer algorithm - Correct Answers: Two sorted arrays, merge into final array (mergesort) Mergesort Efficiency - Correct Answers: n = 8 .File class - Correct Answers: abstract representation of a file or folder Scanner class - Correct Answers: used in reading a file Constructing a file object - Correct Answers: File myFile = new File(""); Text format - Correct Answers: human readable data representation as a sequence of characters Binary Format - Correct Answers: machine-readable data representation as a sequence of bytes

Meer zien Lees minder
Instelling
Data Structures And Algorithm Analysis In C+
Vak
Data Structures and Algorithm Analysis in C+








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

Geschreven voor

Instelling
Data Structures and Algorithm Analysis in C+
Vak
Data Structures and Algorithm Analysis in C+

Documentinformatie

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

Onderwerpen

Voorbeeld van de inhoud

Data Structures & Algorithms
Mid Term Exam Questions with
Answers
Array - Correct Answers: a fixed length collection that holds elements of similar types



Array access elements by _______ - Correct Answers: index



Array elements are stored ________ in memory - Correct Answers: sequentially



Elements are ________ at the left-most empty index - Correct Answers: inserted



Locating values in an unordered array requires a ___________________. - Correct Answers: sequential
search



Deleting unordered arrays 1. ______, 2. _____, 3. ________ - Correct Answers: search, remove, shift



Ordered Arrays - Correct Answers: same structure as unordered, but elements are sorted in natural
order



Unordered array search - Correct Answers: search sequentially left to right



Linear search - Correct Answers: accessing elements by index



Ordered array search - Correct Answers: linear search, binary search



Binary search - Correct Answers: split into halves, decide whether target is higher or lower, repeat
cutting
$18.09
Krijg toegang tot het volledige document:

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

Maak kennis met de verkoper
Seller avatar
EXAMSTUVIA

Ook beschikbaar in voordeelbundel

Thumbnail
Voordeelbundel
Data Structures and Algorithm Analysis Bundle Compilation Grade A+
-
15 2025
$ 262.05 Meer info

Maak kennis met de verkoper

Seller avatar
EXAMSTUVIA stuvia
Bekijk profiel
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2
Lid sinds
1 jaar
Aantal volgers
2
Documenten
1175
Laatst verkocht
5 maanden geleden
Stuvia Exam

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!!!!!!!!!!!!

Lees meer Lees minder
0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

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