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

COEN 12 Midterm 2 (70+ Questions) – Linked Lists, Stacks, Queues, Trees, BST, Heaps – Santa Clara University

Beoordeling
-
Verkocht
-
Pagina's
47
Cijfer
A+
Geüpload op
25-09-2025
Geschreven in
2025/2026

This document presents an extensive and detailed set of over 70 questions and answers from Midterm 2 of COEN 12: Data Structures at Santa Clara University, for the 2025/2026 academic year. It offers deep coverage of key abstract data types and dynamic structures essential to data management, algorithm design, and efficient memory use. Every concept is explained in a concise question-and-answer format, making this document highly effective for exam preparation or concept reinforcement. Key topics include: List ADTs: unordered lists, stacks (LIFO), queues (FIFO), and their real-world applications Runtime analysis for operations like insertion, deletion, and traversal in both arrays and linked structures Singly, doubly, and circular linked lists, with code-level explanations for inserting and deleting nodes Stack and queue implementations (including circular queues), with clear runtime breakdowns Tree structures including terminology (e.g., root, leaf, sibling), recursive traversal (pre-order, in-order, post-order), and tree height calculation Binary Search Trees (BSTs): definition, recursive and iterative search/insertion/deletion, balance properties, min/max retrieval Priority queues and heaps, including insertion and deletion operations, heap property maintenance, and array-based implementations Also included are runtime complexities for all major operations in sets and bags, implemented with both sorted and unsorted singly linked lists, and variations using head-only or head-and-tail pointer structures. This document is ideal for students in: Computer Science Software Engineering Computer Engineering Electrical and Computer Engineering Information Technology It is especially helpful for mastering recursive logic, dynamic memory structures, and the time-space trade-offs in data handling. The detailed explanations and embedded C-style code examples make this resource useful not only for exam preparation but also for coding interviews and academic projects. Keywords: COEN 12, midterm exam, data structures, linked list, singly linked list, doubly linked list, circular list, stack, queue, runtime complexity, recursion, tree traversal, binary tree, binary search tree, BST, preorder, inorder, postorder, priority queue, binary heap, heap insertion, heap deletion, dynamic memory, abstract data types, set, bag, head pointer, tail pointer

Meer zien Lees minder
Instelling
Vak











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

Geschreven voor

Instelling
Vak

Documentinformatie

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

Onderwerpen

Voorbeeld van de inhoud

COEN 12 MIDTERM 2 2025/2026 Exam
Questions and Verified Answers |
Already Graded A+



List - 🧠 ANSWER ✔✔unordered collection of items, not necessarily distinct

(other ADT outside of SET and BAG)


Types of List - 🧠 ANSWER ✔✔1. stacks


2. queue


How to search a List - 🧠 ANSWER ✔✔-indexing


-name/id/key

-position


Stack - 🧠 ANSWER ✔✔-linear list with all additions and deletions restricted

to one end (top)

,-insert: push

-remove/delete: pop

-obeys last in first out (LIFO)

-uses an array


When to Use Stack - 🧠 ANSWER ✔✔Where we need to remember a bunch

of things and go back to the most recent:

-stack of plates

-back button on browser

-undo button


Stack (Push) - 🧠 ANSWER ✔✔- n is the number of elements


- m is the length of the array

assert (n<m);

a[n] = x;

n++;




runtime: O(1)

,Stack (Pop) - 🧠 ANSWER ✔✔- n is the number of elements


- m is the length of the array

assert (n>0);

x = a[n-1];

n--;

return x; //deleted value




runtime: O(1)


Queue - 🧠 ANSWER ✔✔-linear list in which data can only be inserted at

one end (rear) and deleted from other end (front)

-obeys first-in and first-out (FIFO)

-removes oldest item to ensure fairness

-implementation through an array


Enqueue - 🧠 ANSWER ✔✔-insertion


1. add at end

2. remove from the front (always keep front of queue at index 0)


COPYRIGHT©PROFFKERRYMARTIN 2025/2026. YEAR PUBLISHED 2025. COMPANY REGISTRATION NUMBER: 619652435. TERMS OF USE.
PRIVACY STATEMENT. ALL RIGHTS RESERVED

, assert (n<m);

a[n]=x;

n++;

Runtime: O(1)


Dequeue (stagnant index) - 🧠 ANSWER ✔✔-deletion


assert (n>0);

x=a[0];

n--;

for (i=0;i<n-1;i=i+2)

a[i]=a[i+1];

return x;

Runtime: O(n-1) = O(n) //without moving front of array


When to Use Queues - 🧠 ANSWER ✔✔-Grocery shopping line


-Youtube playlist

-Office hours
€13,69
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.
PROFFKERRYMARTIN Liberty University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
107
Lid sinds
10 maanden
Aantal volgers
1
Documenten
7908
Laatst verkocht
5 uur geleden
KERRYMARTIN

KERRYMARTIN EXAM HUB 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
3,4

21 beoordelingen

5
9
4
2
3
4
2
1
1
5

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