Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Exam Questions & Full Solutions | Fully Solved, Easy to Follow, and Designed to Help You Pass with Confidence”

Rating
-
Sold
-
Pages
6
Grade
A+
Uploaded on
27-08-2025
Written in
2025/2026

Exam Questions & Full Solutions | Fully Solved, Easy to Follow, and Designed to Help You Pass with Confidence”

Institution
Nursing Course
Course
Nursing course

Content preview

COSC 2436 Exam 2 Final review
The Ultimate Student Q&A Bundle – Study Smarter, Not Harder"
A sorting algorithm that does not change the relative order of objects that are equal is called -
stable

The quick sort algorithm uses a ________ to divide the array into two pieces. - pivot

Which sorting algorithm divides the array into two pieces based on the selection of a pivot
element? - quick sort

Which statements are true about the pivot element in quick sort? - all of the above

In quick sort, dividing the array portions before and after the pivot are called - partitions

In quick sort, the partition step takes at most ______ comparisons for n items. - n

The ideal situation in quick sort is when the pivot moves - to the center of the array

In quick sort, having every partition form sub array of roughly the same size - is optimal

The best-case performance of quick sort for n items is - O(n log n)

The average-case performance of quick sort for n items is - O(n log n)

The worst-case time efficiency of a sequential search on an array is - O(n)

When searching an unsorted array of items, the recursive search performs ______ comparisons
the iterative search. - the same number of comparisons as

A sequential search of a sorted array can tell whether an item is present in the array in _____ a
sequential search of an unsorted array. - fewer comparisons than

A search on a data set that divides the data roughly in half every iteration is called a(n) _____
search - binary

In an array of 100 items sorted in ascending order, if you are searching for the number 165 and
the entry at array index [50] has a value of 72, what can we conclude? - all of the above

What is the base case in the recursive algorithm for a binary search of a sorted array? - first
index > last

Given the following array, how many comparisons to an array entry are performed to search for
the number 13 if you use the binary search algorithm?

, 2 3 5 7 11 13 17 19 23 29 31 37 - 1

Given the following array, how many comparisons to an array entry are performed to search for
the number 2 if you use the binary search algorithm?

2 3 5 7 11 13 17 19 23 29 31 37 - 5

Given the following array, how many comparisons to an array entry are performed to search for
the number 37 if you use the binary search algorithm?

2 3 5 7 11 13 17 19 23 29 31 37 - 7

Given the following array, how many comparisons to an array entry are performed to search for
the number 11 if you use the binary search algorithm?

2 3 5 7 11 13 17 19 23 29 31 37 - 7

What ADT dictionary method creates an iterator that traverses all the values in the dictionary? -
getValueIterator

In the ADT (Abstract Data Type) dictionary, a key-null pair - is not stored

In the ADT (Abstract Data Type) dictionary, you can traverse - all of the above

If you create a keyIterator and a valueIterator for the same dictionary, the keyIterator is _____
the valueIterator. - the same length as

A sorted dictionary must use search keys that belong to a class that implements the interface -
Comparable

The class Scanner can break a string into substrings called - tokens

The class Scanner can break a string into substrings that are separated by - delimiters

Which method in the class Scanner extracts the tokens from any string? - next

In an ADT dictionary that implements DictionaryInterface, what is returned by the getValue
method if the associated search key is not found? - it return null

A(n) _____ provides the line numbers in a document for each occurrence of a given word. -
concordance

To remove an entry from an unsorted array-based dictionary, locate the entry and - replace
it with the last entry in the dictionary

Written for

Institution
Nursing course
Course
Nursing course

Document information

Uploaded on
August 27, 2025
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$8.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
StudyMastermind

Get to know the seller

Seller avatar
StudyMastermind Teachme2-tutor
View profile
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
208
Last sold
-
Study Mastermind

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions