Searching and Sorting Algorithms
- 59Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is an algorithm, in the sense used in the lecture?
What is an algorithm, in the sense used in the lecture?
59 questions
- 1
What is an algorithm, in the sense used in the lecture?
- A
A programming language used to write computer code
- B
A particular arrangement of values stored in computer memory
- C
A measurement of how much memory a computer contains
- D
A step-by-step set of instructions for solving a problem
Correct answer
DA step-by-step set of instructions for solving a problem
Explanation
An algorithm is a set of step-by-step instructions for solving a problem, such as ordering information.
- A
- 2
Which description best captures sorting information?
- A
Removing items that do not satisfy a condition selected by the user
- B
Finding one requested item without changing the order of other items
- C
Ordering it according to a chosen rule, such as size or alphabetic order
- D
Storing every item in a separate location so it can be accessed at once
Correct answer
COrdering it according to a chosen rule, such as size or alphabetic order
Explanation
Sorting means ordering information according to a rule or heuristic, such as smallest to largest or alphabetically.
- A
- 3
Why does counting people one at a time have linear running time?
- A
Each additional person doubles the number of steps required
- B
Each additional person requires roughly one additional counting step
- C
The number of steps stays fixed regardless of the number of people
- D
Each additional person requires one fewer step than the previous person
Correct answer
BEach additional person requires roughly one additional counting step
Explanation
Counting one person at a time requires work proportional to the number of people, so the running time grows linearly.
- A
- 4
Why does repeatedly combining pairs of counts take logarithmic steps in the attendance demonstration?
- A
Each round combines groups and reduces the number of active counters by about half
- B
Each round checks every person again and adds one fixed step
- C
Each round increases the number of active counters by a fixed amount
- D
Each round removes exactly one person from the counting process
Correct answer
AEach round combines groups and reduces the number of active counters by about half
Explanation
Pairing and combining counts repeatedly halves the number of active groups, so the number of rounds grows logarithmically with the group size.
- A
- 5
If the number of people in a pairwise-combining attendance process is doubled, how does the number of rounds change?
- A
It increases by about one round
- B
It stays exactly the same
- C
It increases by about two rounds
- D
It doubles
Correct answer
AIt increases by about one round
Explanation
Each round approximately halves the groups, so doubling the initial number requires only about one additional halving round.
- A
- 6
What does Big O notation primarily describe in this lecture?
- A
The average number of times a function calls itself
- B
The minimum memory required to store an algorithm's input
- C
An asymptotic upper bound on how an algorithm's running time grows
- D
The exact number of operations an algorithm performs on every input
Correct answer
CAn asymptotic upper bound on how an algorithm's running time grows
Explanation
Big O gives an upper bound on growth; it is commonly used to describe how an algorithm can perform in a worst-case situation.
- A
- 7
Why are constant factors such as dividing the input size by two usually ignored in Big O notation?
- A
They apply only when an algorithm has no loops
- B
They affect memory use but cannot affect running time
- C
They do not change the dominant growth category as the input becomes large
- D
They guarantee that all algorithms with the same notation take equal time
Correct answer
CThey do not change the dominant growth category as the input becomes large
Explanation
Big O focuses on the dominant term as the input grows, so constant multipliers such as one-half do not change a linear growth classification.
- A
- 8
What does Omega notation describe?
- A
An asymptotic upper bound on an algorithm's running time
- B
An asymptotic lower bound on an algorithm's running time
- C
The amount of additional space used by an algorithm
- D
An exact running time for every possible input
Correct answer
BAn asymptotic lower bound on an algorithm's running time
Explanation
Omega describes a lower bound, often interpreted as the algorithm's best-case performance in the examples discussed.
- A
- 9
When is Theta notation appropriate?
- A
When the asymptotic upper and lower bounds have the same growth rate
- B
When the best case is faster than the worst case
- C
When the input has been sorted before the algorithm begins
- D
When an algorithm has a recursive function but no base case
Correct answer
AWhen the asymptotic upper and lower bounds have the same growth rate
Explanation
Theta can describe an algorithm when its Big O upper bound and Omega lower bound match asymptotically.
- A
- 10
Why might sorting data before searching be worthwhile in some situations but wasteful in others?
- A
Sorting uses no resources if the search algorithm is binary search
- B
Its cost may pay off over many searches, but may not be worthwhile for a single search
- C
Sorting always makes every search slower, regardless of how often the data is searched
- D
The benefit of sorting depends only on the number of values, not on how often they are searched
Correct answer
BIts cost may pay off over many searches, but may not be worthwhile for a single search
Explanation
Sorting has an upfront cost. Repeated searches can amortize that cost, while sorting solely to perform one search may be less efficient than using linear search directly.
- A
- 11
What is the defining memory-layout property of an array described in the lecture?
- A
Its values can only be accessed by examining the entire array
- B
Its values are stored in separate, unrelated memory regions
- C
Its values are stored in alphabetical order
- D
Its values occupy consecutive locations in memory
Correct answer
DIts values occupy consecutive locations in memory
Explanation
An array is a contiguous chunk of memory whose values are stored back to back.
- A
- 12
In the simple memory model used in the lecture, how does a computer inspect array values?
- A
It accesses one value at a time by going to that location
- B
It reads only the first and last values and infers the rest
- C
It accesses values only after converting the array into a string
- D
It automatically sees every value in the array simultaneously
Correct answer
AIt accesses one value at a time by going to that location
Explanation
The model assumes the computer must access each location individually rather than see the entire array at once.
- A
- 13
An array contains n values and uses zero-based indexing. What is the index of its final value?
- A
n−1
- B
0
- C
n
- D
n+1
Correct answer
An−1
Explanation
With zero-based indexing, the first value is at index 0, so the last of n values is at index n−1.
- A
- 14
What kind of answer did the locker-search problem require?
- A
A count of how many values were smaller than the target
- B
The index of every value in the entire array
- C
The sorted list of all values found in the lockers
- D
A Boolean answer indicating whether the target value was present
Correct answer
DA Boolean answer indicating whether the target value was present
Explanation
The specified output was a true-or-false answer indicating whether the target denomination was present.
- A
- 15
Which procedure describes linear search through an array?
- A
Sort the array and return the location of its largest element
- B
Check the middle element and discard half of an unsorted array
- C
Swap neighboring elements until the target reaches the first location
- D
Check elements in sequence until the target is found or no elements remain
Correct answer
DCheck elements in sequence until the target is found or no elements remain
Explanation
Linear search examines elements sequentially and stops when it finds the target or reaches the end.
- A
- 16
What is the worst-case running time of linear search through n values?
- A
O(n)
- B
O(logn)
- C
O(1)
- D
O(n2)
Correct answer
AO(n)
Explanation
In the worst case, the target is last or absent, so linear search may inspect all n values.
- A
- 17
What is the best-case running time of linear search when the target may be first?
- A
Ω(1)
- B
Ω(logn)
- C
Ω(n)
- D
Ω(n2)
Correct answer
AΩ(1)
Explanation
If the target is the first element, linear search finds it in a constant number of steps, independent of the array's size.
- A
- 18
What key condition allows binary search to decide which half of an array can be discarded?
- A
The values are stored as strings rather than integers
- B
The values are sorted so their order supports less-than and greater-than decisions
- C
The target is known to be located at one of the ends
- D
The array contains an even number of values
Correct answer
BThe values are sorted so their order supports less-than and greater-than decisions
Explanation
Binary search relies on sorted data: comparison with the middle value indicates which half can still contain the target.
- A
- 19
Why is binary search generally incorrect on an unsorted array?
- A
A comparison with the middle value cannot reliably identify which half contains the target
- B
It cannot operate on arrays that use zero-based indexing
- C
It always returns the index of the middle value rather than searching
- D
It must compare every pair of values before examining the middle
Correct answer
AA comparison with the middle value cannot reliably identify which half contains the target
Explanation
Without sorted order, a smaller or larger value is not guaranteed to lie on a particular side of the middle element.
- A
- 20
For an array of 7 elements using zero-based indices, which index is the middle when the index is computed by dividing the length by 2 and rounding down?
- A
4
- B
3
- C
7
- D
3.5
Correct answer
B3
Explanation
Integer division of 7 by 2 rounds down to 3, the middle index in an array indexed from 0 through 6.
- A
- 21
After checking the middle element in binary search, why does the next search range exclude that element?
- A
Binary search is required to skip every other element after a comparison
- B
The middle element is always guaranteed to be the largest value
- C
The middle element has already been checked and need not be examined again
- D
The middle element cannot be represented by an array index
Correct answer
CThe middle element has already been checked and need not be examined again
Explanation
Once the middle value has been compared with the target, it should not be checked again; the remaining range is on one side of it.
- A
- 22
What should binary search return when there are no elements left to search?
- A
The middle index, because no comparison is necessary
- B
True, because the search has reached its stopping condition
- C
The largest value previously encountered
- D
False, because the target cannot be present in an empty range
Correct answer
DFalse, because the target cannot be present in an empty range
Explanation
An empty search range means there is no remaining location that can contain the target, so the search returns false.
- A
- 23
Which C construct is suitable for checking each element of a fixed-size array in sequence?
- A
A conditional statement that checks only the first location
- B
A structure declaration that creates a new data type
- C
A return statement placed before any comparison
- D
A loop that advances an index from the first location through the last
Correct answer
DA loop that advances an index from the first location through the last
Explanation
A loop can increment an index and compare each array value in turn, implementing linear search.
- A
- 24
Why must a linear-search implementation return false after the loop rather than immediately after the first mismatch?
- A
A return statement automatically advances the loop index
- B
The first mismatch proves that the array is sorted in reverse
- C
A false result is valid only when the array has no elements
- D
A mismatch at one location does not rule out a match at a later location
Correct answer
DA mismatch at one location does not rule out a match at a later location
Explanation
The target may occur later in the array, so the search should return false only after all locations have been checked.
- A
- 25
Why can a C compiler infer an array's size when it is initialized with a list of values?
- A
It determines the size by examining the loop that will search the array
- B
It assumes every initialized array contains seven values
- C
It can count the values provided in the initializer
- D
It reads the array's final value to determine the number of locations
Correct answer
CIt can count the values provided in the initializer
Explanation
When an array is initialized with known values in braces, the compiler can count them and infer the array length.
- A
- 26
Why is using
==to compare two strings in C not the appropriate way to test whether their text matches?- A
C strings cannot be compared for equality using any function
- B
The
==operator automatically sorts strings instead of comparing them - C
The
==operator works only when both strings have exactly one character - D
String equality requires comparing the characters, which
==does not do as a text comparison
Correct answer
DString equality requires comparing the characters, which
==does not do as a text comparisonExplanation
The lecture uses
strcmpbecause string equality requires comparing the characters in the strings, rather than using==as for integer values. - A
- 27
According to the described behavior of
strcmp, what return value indicates that two strings are equal?- A
Any negative value
- B
0
- C
Any positive value
- D
The length of the first string
Correct answer
B0
Explanation
strcmpreturns 0 when the strings match; negative or positive results indicate an ordering difference. - A
- 28
What additional information can the sign of
strcmp's result provide?- A
Which string comes first in character-code order
- B
The memory address where the strings are stored
- C
Whether either string was created as an array
- D
How many characters the strings share
Correct answer
AWhich string comes first in character-code order
Explanation
A negative or positive result can indicate which string comes first according to character-code ordering, which can support sorting.
- A
- 29
What must a C program include to use
strcmpas described?- A
No header, because
strcmpis a language keyword - B
The
string.hheader - C
The
stdlib.hheader only - D
The
math.hheader
Correct answer
BThe
string.hheaderExplanation
The program must include
string.hso the compiler has the declaration forstrcmp. - A
- 30
Why can a phone number be better represented as a string than as an integer?
- A
Strings automatically validate whether a phone number is callable
- B
It must always be added to other phone numbers arithmetically
- C
An integer can store more punctuation than a string can
- D
It may contain punctuation or leading zeros that are meaningful in its written form
Correct answer
DIt may contain punctuation or leading zeros that are meaningful in its written form
Explanation
Phone numbers can include plus signs, dashes, parentheses, or significant leading zeros, which an integer representation does not preserve as written.
- A
- 31
What is the main design risk of storing names and phone numbers in separate parallel arrays?
- A
Each array is required to use a different indexing system
- B
Their corresponding entries can become misaligned if the arrays' sizes or orders differ
- C
The computer is unable to search either array using a loop
- D
The arrays cannot contain strings when they have the same length
Correct answer
BTheir corresponding entries can become misaligned if the arrays' sizes or orders differ
Explanation
Parallel arrays rely on matching indices and consistent ordering, so a mismatch can associate a person with the wrong number.
- A
- 32
What does a
structallow a C programmer to do in the phone-book example?- A
Make a string behave exactly like an integer
- B
Sort an array without comparing any of its values
- C
Access every array element simultaneously
- D
Define a custom type that groups related fields, such as a name and a number
Correct answer
DDefine a custom type that groups related fields, such as a name and a number
Explanation
A structure defines a custom data type that groups related fields together, such as each person's name and phone number.
- A
- 33
In an expression such as
people[i].name, what does the dot notation do?- A
Compares the name at index
iwith every other name - B
Changes the array index from zero-based to one-based
- C
Accesses the
namefield of the structure at indexi - D
Creates a new array containing all names
Correct answer
CAccesses the
namefield of the structure at indexiExplanation
The dot operator accesses a particular field within a structure value.
- A
- 34
What is the central repeated action in selection sort?
- A
Compare neighboring values and swap each pair that is out of order
- B
Find the smallest remaining value and swap it into the next position
- C
Divide the array in half and merge the two halves immediately
- D
Move the largest remaining value one position to the right
Correct answer
BFind the smallest remaining value and swap it into the next position
Explanation
Selection sort repeatedly selects the smallest value in the unsorted portion and swaps it into the next position to be filled.
- A
- 35
After selection sort has placed the smallest remaining value at index i, what can it conclude about earlier positions?
- A
They must contain values larger than every remaining value
- B
They contain values already selected in sorted order
- C
They need to be searched again before the next pass
- D
They are guaranteed to be in their original order
Correct answer
BThey contain values already selected in sorted order
Explanation
Each pass places the next smallest value at the next position, so the prefix already processed is sorted.
- A
- 36
Why does selection sort swap values rather than simply insert the selected value outside the array?
- A
An array cannot store a value at an index that has already been used
- B
The array has fixed allocated locations, so rearranging its elements should stay within that space
- C
The selected value must be copied into a new array after every comparison
- D
Swapping is required because selection sort never compares values
Correct answer
BThe array has fixed allocated locations, so rearranging its elements should stay within that space
Explanation
The demonstration treats the array as fixed-size memory; it cannot assume extra locations outside its allocated space are available.
- A
- 37
What is the number of comparisons made by the passes of selection sort, expressed as a sum for an array of n values?
- A
log2(n)+log2(n−1)+⋯+log2(1)
- B
1+1+⋯+1 for exactly one comparison per value
- C
n+(n+1)+⋯+2n
- D
(n−1)+(n−2)+⋯+1
Correct answer
D(n−1)+(n−2)+⋯+1
Explanation
The first pass scans n−1 other values, the next scans n−2, and the process continues down to one comparison.
- A
- 38
What is the asymptotic running time of selection sort in the described analysis?
- A
Θ(nlogn)
- B
Θ(n2)
- C
Θ(n)
- D
Θ(1)
Correct answer
BΘ(n2)
Explanation
Selection sort performs a quadratic number of comparisons, even when the input is already sorted, so both its upper and lower bounds are n2.
- A
- 39
What operation is repeated in bubble sort?
- A
Find the smallest value in the entire unsorted portion and move it to the front
- B
Merge two sorted lists by repeatedly selecting their smallest front value
- C
Compare adjacent values and swap them if they are out of order
- D
Compare the middle value with the target and discard half the array
Correct answer
CCompare adjacent values and swap them if they are out of order
Explanation
Bubble sort scans adjacent pairs and swaps a pair when its values are out of order.
- A
- 40
If an array has indices from 0 through n−1, why does a bubble-sort inner loop stop at n−2 when it compares index i with index i+1?
- A
At i=n−2, the final array value has already been removed
- B
The algorithm requires the final index to remain unchanged
- C
The last comparison would always swap the two values
- D
At i=n−1, the comparison would access the nonexistent index n
Correct answer
DAt i=n−1, the comparison would access the nonexistent index n
Explanation
The right-hand index is i+1; allowing i=n−1 would make the algorithm access index n, beyond the array's last index.
- A
- 41
Why does basic bubble sort make repeated passes through the array?
- A
One pass checks only the first array element and cannot compare any pairs
- B
A pass reverses the array, so another pass is needed to restore it
- C
One pass can move a largest remaining value to the end, but other values may still be unsorted
- D
Each pass inserts a new value that was not previously in the array
Correct answer
COne pass can move a largest remaining value to the end, but other values may still be unsorted
Explanation
A pass can bubble a large value toward the end, but other elements may still be out of order, requiring further passes.
- A
- 42
What early-stop improvement gives bubble sort a best-case running time of Ω(n)?
- A
Stop after the first swap because the array is then sorted
- B
Stop whenever the first adjacent pair is already in order
- C
Skip all comparisons on the first pass
- D
Stop after a complete pass in which no swaps were made
Correct answer
DStop after a complete pass in which no swaps were made
Explanation
A pass with no swaps shows that the list is already sorted, so the algorithm can terminate after that one linear pass.
- A
- 43
What is the worst-case running time of bubble sort, even with the no-swap early-stop improvement?
- A
O(n2)
- B
O(logn)
- C
O(1)
- D
O(n)
Correct answer
AO(n2)
Explanation
The early stop helps when a pass makes no swaps, but unsorted inputs can still require many passes of adjacent comparisons, giving quadratic worst-case time.
- A
- 44
How does bubble sort's early-stop condition differ from the selection-sort procedure described?
- A
It guarantees that bubble sort uses less memory than selection sort
- B
It allows bubble sort to avoid comparing any adjacent values
- C
It can detect an already sorted list after a pass with no swaps, while selection sort still performs its prescribed scans
- D
It makes selection sort linear on every input but leaves bubble sort quadratic
Correct answer
CIt can detect an already sorted list after a pass with no swaps, while selection sort still performs its prescribed scans
Explanation
The modified bubble sort checks whether a pass made any swaps; the described selection sort continues finding the next minimum even when the list is already ordered.
- A
- 45
What is the defining idea behind recursion in programming?
- A
A function compares two values without returning from its call
- B
A function calls itself to solve a smaller version of a problem
- C
A function stores its input in adjacent memory locations
- D
A function repeats a fixed number of statements using a loop
Correct answer
BA function calls itself to solve a smaller version of a problem
Explanation
A recursive function is one that calls itself, often with a smaller version of the original problem.
- A
- 46
What feature prevents a recursive algorithm from calling itself forever?
- A
A loop that repeats the same problem without changing its size
- B
A return statement placed only after the recursive call
- C
A larger input passed to each successive call
- D
A base case that ends the recursion, together with recursive calls that reduce the problem
Correct answer
DA base case that ends the recursion, together with recursive calls that reduce the problem
Explanation
A base case provides a stopping condition, and each recursive call must make progress toward it by reducing the problem.
- A
- 47
In recursive binary search, why does searching the left or right half make progress?
- A
Each recursive call increases the number of candidate elements
- B
Each recursive call repeats the search on the original full array
- C
Each recursive call skips the comparison with the middle element
- D
Each recursive call searches a smaller range than the previous call
Correct answer
DEach recursive call searches a smaller range than the previous call
Explanation
Binary search recursively examines only one side of the checked middle element, reducing the search range each time.
- A
- 48
Which description best distinguishes a base case from a recursive case?
- A
A base case increases the input; a recursive case leaves the input unchanged
- B
A base case always uses a loop; a recursive case always uses an array
- C
A base case returns a direct answer; a recursive case calls the algorithm on a smaller problem
- D
A base case sorts the whole input; a recursive case checks only one element
Correct answer
CA base case returns a direct answer; a recursive case calls the algorithm on a smaller problem
Explanation
A base case can be answered immediately, whereas a recursive case relies on solving a smaller instance of the problem.
- A
- 49
What is iteration in the contrast made with recursion?
- A
Storing related values in a custom type
- B
Using loops to solve a problem
- C
Using a function that calls itself
- D
Sorting data by comparing adjacent values
Correct answer
BUsing loops to solve a problem
Explanation
Iteration refers to solving a problem with loops, while recursion uses functions that call themselves.
- A
- 50
How does the recursive description of a pyramid of height n express its structure?
- A
Two pyramids of height n placed side by side
- B
A single row repeated exactly once
- C
A pyramid of height n−1 plus one additional row
- D
A pyramid of height n+1 minus its top row
Correct answer
CA pyramid of height n−1 plus one additional row
Explanation
The pyramid is defined as a smaller pyramid of height n−1 with one more row added.
- A
- 51
In the recursive pyramid implementation, why is a condition such as n≤0 useful?
- A
It ensures that every call draws at least one additional row
- B
It makes the recursive calls use a larger height each time
- C
It sorts the rows before they are printed
- D
It stops drawing when there are no rows left and prevents further recursive calls
Correct answer
DIt stops drawing when there are no rows left and prevents further recursive calls
Explanation
When the height reaches zero or less, there is nothing to draw, so returning provides the base case that ends recursion.
- A
- 52
What memory trade-off can arise from a deeply recursive implementation compared with an iterative one?
- A
Recursion always uses less memory because it avoids loops
- B
Iteration requires a separate copy of the input for every loop pass
- C
Recursive calls never use memory once a base case is present
- D
Each function call uses additional memory, and sufficiently many calls can exceed available memory
Correct answer
DEach function call uses additional memory, and sufficiently many calls can exceed available memory
Explanation
Each recursive call requires memory for its call state; deep recursion can use too much memory, unlike the corresponding loop-based approach described.
- A
- 53
What is the base case stated for merge sort?
- A
A list with two values must always be merged with an empty list
- B
A list with one value is already sorted
- C
A list with no values must be divided into two equal halves
- D
A list with n values is sorted when its first value is smallest
Correct answer
BA list with one value is already sorted
Explanation
A single value is already sorted, so merge sort can stop dividing when it reaches a list of size one.
- A
- 54
When merging two already sorted lists, how can the next smallest value be chosen?
- A
Choose values randomly until both lists are empty
- B
Take the final value from each list and choose the larger one
- C
Re-sort both lists from the beginning after every value is moved
- D
Compare the first unmerged value in each list and take the smaller one
Correct answer
DCompare the first unmerged value in each list and take the smaller one
Explanation
Because each list is sorted, its first unmerged value is its smallest remaining value; comparing the two fronts identifies the next value for the merged list.
- A
- 55
Why does merging two sorted lists with a total of n values take O(n) time?
- A
The number of comparisons depends only on the logarithm of each list's length
- B
Each value is considered and moved into the merged order once
- C
The algorithm repeatedly sorts the same two lists from scratch
- D
Every value must be compared with every other value
Correct answer
BEach value is considered and moved into the merged order once
Explanation
The merge advances through the sorted lists, processing each of the n values once, so its work is linear in the total number of values.
- A
- 56
Which sequence of steps describes merge sort?
- A
Search the middle, discard one half, then return the matching index
- B
Sort the left half, sort the right half, then merge the sorted halves
- C
Find the smallest value, swap it to the front, then repeat on the rest
- D
Compare adjacent values, swap them, then stop after one pass
Correct answer
BSort the left half, sort the right half, then merge the sorted halves
Explanation
Merge sort recursively sorts each half of the input and then merges those sorted halves.
- A
- 57
Why does merge sort have O(nlogn) running time in the described analysis?
- A
It performs constant work for each value across n levels
- B
It performs quadratic comparisons but skips half of them on each pass
- C
It examines only log2n values and ignores the rest
- D
It performs linear merging work across about log2n levels of division
Correct answer
DIt performs linear merging work across about log2n levels of division
Explanation
The input is divided in half for about log2n levels, and each level involves a total of O(n) merging work.
- A
- 58
What asymptotic classification is given for merge sort's lower and upper bounds in this version?
- A
Its upper bound is nlogn and its lower bound is 1
- B
Both are n, so its running time is Θ(n)
- C
Both are nlogn, so its running time is Θ(nlogn)
- D
Its upper bound is n2 and its lower bound is n
Correct answer
CBoth are nlogn, so its running time is Θ(nlogn)
Explanation
The described merge-sort algorithm has matching O(nlogn) and Ω(nlogn) bounds, which yields Θ(nlogn).
- A
- 59
What space requirement is identified as a trade-off for merge sort?
- A
It needs space proportional only to the number of recursive levels
- B
It requires no storage beyond the original array
- C
It requires an additional copy for every comparison, regardless of input size
- D
It needs extra space to hold and merge sorted portions of the input
Correct answer
DIt needs extra space to hold and merge sorted portions of the input
Explanation
The merge demonstration uses extra space to hold the sorted portions while combining them; the lecture characterizes this as requiring twice as much space.
- A

Ask anything
We've read this whole study set, so questions about it get the best answers.