• 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 2 out of 5 pages
Exam (elaborations)

Exam 2 CSE 310 2025 Questions and Answers

Document preview thumbnail
Preview 2 out of 5 pages

Exam 2 CSE 310 2025 Questions and Answers

Content preview

Exam 2 CSE 310 2025 Questions and
Answers


Binary Search Tree properties - ANSWER-Each node has 0 to 2 children

Children on left are less than parent

Children on right are greater than parent

Dynamic Set Operations - ANSWER-Add, Delete, Minimum, Maximum, Search,

Predecessor, Successor

Binary Search Tree minimum - ANSWER-Returns the bottom left most node

Binary Search Tree Maximum - ANSWER-Returns the bottom right most node

In order traversal - ANSWER-left, root, right

Pre order traversal - ANSWER-root, left, right

Post order traversal - ANSWER-left, right, root

Tree predecessor - ANSWER-returns the greatest number less than x

Tree successor - ANSWER-returns the lowest number greater than x

Which traversal helps with predecessor/successor - ANSWER-In Order traversal



COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 1

, Binary search tree search runtime - ANSWER-O(h)

Binary search tree insert runtime - ANSWER-O(logn)

Binary search tree transplant runtime - ANSWER-O(1)

Properties of RB BST - ANSWER-Every node is either red or black

Every null node is black

Every red node has black children

Every path has the same number of black nodes

The root is black

T/F: RB Trees can have a path that is twice as long as another - ANSWER-False

Red Black Tree insert run time - ANSWER-O(logn)

Runtime of left rotate and right rotate - ANSWER-O(1)

Two ingredients for dynamic programming - ANSWER-Optimal substructure and

Overlapping subproblems

Difference between dynamic programming and divide and conquer - ANSWER-

Overlapping vs not overlapping subproblems

Longest common subsequence runtime with dynamic programming - ANSWER-

O(mn) where m is the length of subsequence X and n is the length of subsequence

Y



COPYRIGHT ©️ 2025 ALL RIGHTS RESERVED...TRUSTED & VERIFIED 2

Document information

Uploaded on
August 17, 2025
Number of pages
5
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.99

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.
KatelynWhitman
3.6
(260)
Sold
1255
Followers
485
Items
43943
Last sold
12 hours 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