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)

DATA STRUCTURES FINAL RUTGERS EXAM QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
28-07-2025
Written in
2024/2025

DATA STRUCTURES FINAL RUTGERS EXAM QUESTIONS AND ANSWERS

Institution
DATA STRUCTURES
Course
DATA STRUCTURES

Content preview

DATA STRUCTURES FINAL RUTGERS
EXAM QUESTIONS AND ANSWERS




Suppose that you have an unsorted array A of size n and a sorted array B of size m.
Note that n is much larger than m. Answer the questions below.
What is the fastest algorithm to find the common values in these two arrays? - Correct
Answers -for each value in A do a binary search on B

What is the running time (big O notation) to insert a new node in the front of a
Circular Linked List - Correct Answers -O(1)
To insert at the front requires creating a new node and updating the last pointer
to the new front. No list traversal is needed
Suppose that x is a Node in a CLL. What does the following code fragment do?
Node t = new Node();
t.item = "Apples";
t.next = x.next;
x.next = t; - Correct Answers -Inserts node t immediately after node x.

Assume n items will be inserted into a data structure:
• n is much greater than 0.
• The n items can be store into a computer's memory.
• The only operation that occurs in the data structure is insertion
which is the fastest data structure to store these n items? - Correct Answers -Array,
unsorted array or linked list

What is the running time (big O) for rehashing given the input size n? Give the
reasoning. - Correct Answers -O(n).
Each of the n keys will need to be remapped to the new table

What is the worst case running time (big O notation) to insert a new node in a
sorted Doubly Linked List? - Correct Answers -O(n)
Item to be inserted is greater than all other items in the list. Need to traverse the
entire list to insert item.

Insert a new node to the beginning of the list. best and worst - Correct Answers -O(1)

Written for

Institution
DATA STRUCTURES
Course
DATA STRUCTURES

Document information

Uploaded on
July 28, 2025
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.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
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.
millyphilip West Virginia University
Follow You need to be logged in order to follow users or courses
Sold
2921
Member since
4 year
Number of followers
1958
Documents
44307
Last sold
1 hour ago
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.6

551 reviews

5
239
4
87
3
104
2
32
1
89

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

Working on your references?

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

Working on your references?

Frequently asked questions