• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 1 pages
Exam (elaborations)

cmsc 132 runtime stuff(Correctly solved)

Document preview thumbnail
Preview 1 out of 1 pages

What is the average runtime for adding an element to the end of a singly linked list with a tail reference? correct answers O(1) What is the worst-case runtime for removing an element from a singly linked list if you are given a cursor to the node containing that element? correct answers O(n) What is the best-case runtime for adding an element to the end of a singly linked list with NO tail reference? correct answers O(n) What is the average runtime for searching a doubly linked list? correct answers O(n) What is the average runtime for adding an element to the head of a singly linked list? correct answers O(1) Search of a well balanced binary search tree (average case) correct answers O(logn) search on a binary search tree (worst case) correct answers O(n) search on a hash table with uniformly distributed elements (average case) correct answers O(1) accessing an element of an array by index number (worst case) correct answers O(1) accessing an element of a linked list by index number (average case) correct answers O(n) insert an element into an array at a given index (average case) correct answers O(n) Insert at the head of a linked list (Worst case) correct answers O(1) add element to.a heap (worst case) correct answers O(logn) remove at tail of doubly linked list (worst case) correct answers O(1) remove at tail of linked list while maintaining tail element (average case) correct answers O(n) Which is better for accessing an element at index i? correct answers array Which is better for performing a binary search (when already sorted)? correct answers array Which is better for inserting at the front of the list? correct answers linked list Which is better for inserting at index i? correct answers both array & linked list are O(n)


Document information

Uploaded on
May 29, 2024
Number of pages
1
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$11.09

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

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.
Sold
23
Followers
6
Items
4026
Last sold
1 month ago




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

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