100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH 100% CORRECT ANSWERS L LATEST VERSION 2025/2026.

Rating
-
Sold
-
Pages
48
Grade
A+
Uploaded on
25-11-2025
Written in
2025/2026

DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH 100% CORRECT ANSWERS L LATEST VERSION 2025/2026.

Institution
DATA STRUCTURES AND ALGORITHMS
Course
DATA STRUCTURES AND ALGORITHMS











Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
DATA STRUCTURES AND ALGORITHMS
Course
DATA STRUCTURES AND ALGORITHMS

Document information

Uploaded on
November 25, 2025
Number of pages
48
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

DATA STRUCTURES AND ALGORITHMS
EXAM QUESTIONS WITH 100%
CORRECT ANSWERS L LATEST
VERSION 2025/2026.




_________ _______________ refer to how data is organized. - ANS Data structures


The _________________ ____ _____ doesn't just matter for organization's sake, but can
significantly impact how fast your code runs. - ANS organization of data


When you have a solid grasp on the various data structures and each one's performance
implications on the program that you're writing, you will have the keys to write fast and elegant
_______ that will ensure that your software will run quickly and smoothly. - ANS code


An ________ is simply a list of data elements. - ANS array


The _________ of an array is the number that identifies where a piece of data lives inside the
array. - ANS index


In most programming languages, we begin counting the index at ______. - ANS 0


Most data structures are used in four basic ways, which we refer to as ___________________. -
ANS operations
1 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

,The four operations are: - ANS Read, Search, Insert, Delete


______________ refers to looking something up from a particular spot within the data
structure. With an array, this would mean looking up a value at a particular index. For example,
looking up which grocery item is located at index 2 would be ___________ from the array. -
ANS Reading


____________ refers to looking for a particular value within a data structure. With an array, this
would mean looking to see if a particular value exists within the array, and if so, which index it's
at. For example, looking to see if "dates" is in our grocery list, and which index it's located at
would be searching the array. - ANS Searching


________________ refers to adding another value to our data structure. With an array, this
would mean adding a new value to an additional slot within the array. If we were to add "figs"
to our shopping list, we'd be inserting a new value into the array. - ANS Inserting


________________ refers to removing a value from our data structure. With an array, this
would mean removing one of the values from the array. For example, if we removed "bananas"
from our grocery list, that would be deleting from the array. - ANS Deletion


when we measure how "_______" an operation takes, we do not refer to how fast the operation
takes in terms of pure time, but instead in how many steps it takes. - ANS fast


We can measure the speed of an operation in terms of how many steps it takes. If Operation A
takes five steps, and Operation B takes 500 steps, we can assume that Operation A will always
be faster than Operation B on all pieces of hardware. Measuring the number of steps is
therefore the key to analyzing the speed of an operation. - ANS


Measuring the speed of an operation is also known as measuring its ________ ___________.
Throughout this book, we'll use the terms speed, time complexity, efficiency, and performance
interchangeably. They all refer to the number of steps that a given operation takes. -
ANS time complexity



2 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

,When a program declares an array, it ____________ a contiguous set of empty cells for use in
the program. So, if you were creating an array meant to hold five elements, your computer
would find any group of five empty cells in a row and designate it to serve as your array: -
ANS allocates


Now, every cell in a computer's memory has a specific address. It's sort of like a street address
(for example, 123 Main St.), except that it's represented with a simple number. Each cell's
memory address is one number greater than the previous cell. - ANS


With an __________,


1. A computer can jump to any memory address in one step. (Think of this as driving to 123
Main Street—you can drive there in one trip since you know exactly where it is.)
2. Recorded in each array is the memory address which it begins at. So the computer has this
starting address readily.

3. Every array begins at index 0. - ANS array


_____________ from an array is, therefore, a very efficient operation, since it takes just one
step. An operation with just one step is naturally the fastest type of operation. One of the
reasons that the array is such a powerful data structure is that we can look up the value at any
index with such speed. - ANS Reading


For _________________, To search for a value within an array, the computer starts at index 0,
checks the value, and if it doesn't find what it's looking for, moves on to the next index. It does
this until it finds the value it's seeking. - ANS searching


A basic search operation—in which the computer checks each cell one at a time—is known as
_______ ___________. - ANS linear search


Now, what is the maximum number of steps a computer would need to conduct a linear search
on an array? - ANS If the value we're seeking happens to be in the final cell in the array (like
"elderberries"), then the computer would end up searching through every cell of the array until
it finally finds the value it's looking for. Also, if the value we're looking for doesn't occur in the


3 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

, array at all, the computer would likewise have to search every cell so it can be sure that the
value doesn't exist within the array.


So it turns out that for an array of five cells, the maximum number of steps that linear search
would take is five. For an array of 500 cells, the maximum number of steps that linear search
would take is 500. - ANS Another way of saying this is that for N cells in an array, linear search
will take a maximum of N steps. In this context, N is just a variable that can be replaced by any
number.


it's clear that searching is less efficient than ___________, since searching can take many steps,
while reading always takes just one step no matter how large the array. - ANS reading


The efficiency of _____________ a new piece of data inside an array depends on where inside
the array you'd like to insert it. - ANS inserting


Let's say we wanted to add "figs" to the very end of our shopping list. Such an insertion takes
just one step. As we've seen earlier, the computer knows which memory address the array
begins at. Now, the computer also knows how many elements the array currently contains, so it
can calculate which memory address it needs to add the new element to, and can do so in one
step. - ANS Inserting a new piece of data at the beginning or the middle of an array, however,
is a different story. In these cases, we need to shift many pieces of data to make room for what
we're inserting, leading to additional steps.


The worst-case scenario for _________ ____ ___ _____—that is, the scenario in which insertion
takes the most steps—is where we insert data at the beginning of the array. This is because
when inserting into the beginning of the array, we have to move all the other values one cell to
the right. - ANS insertion into an array


insertion in a worst-case scenario can take up to N + 1 steps for an array containing N elements.
This is because the worst-case scenario is inserting a value into the beginning of the array in
which there are N shifts (every data element of the array) and one insertion. - ANS


___________—is like insertion, but in reverse. - ANS deletion




4 @COPYRIGHT 2025/2026 ALLRIGHTS RESERVED.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Brightstars Havard School
View profile
Follow You need to be logged in order to follow users or courses
Sold
193
Member since
1 year
Number of followers
7
Documents
12191
Last sold
5 days ago
VERIFIED EXAMS AND STUDY GUIDES.

Here, you will find Study Notes, Exam answer packs 100% Guarenteed success.

3.3

31 reviews

5
10
4
4
3
8
2
3
1
6

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions