100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Exam (elaborations)

DSA QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
4
Grade
A+
Uploaded on
29-08-2024
Written in
2024/2025

Exam of 4 pages for the course DSA at DSA (DSA QUESTIONS)

Institution
DSA
Course
DSA

Content preview

DSA QUESTIONS

All binary search trees are balanced - answer False

Which of the traversals in the binary search tree gives a sorted list? - answer In-order

If node K is to be deleted, the value of which node could be used to replace it? More
answers might be correct and you have to choose all of them - answerM, J

What statements are true? More answers might be correct. - answer- In a binary search
tree a new element is always added as a leaf.
- A binary search tree is a tree whose elements are organised to facilitate finding a
particular element when needed.

We consider an AVL tree with 7 nodes and we know that the height of a tree with a
single node is 0. What is the maximum height of our AVL tree? - answer3

Al binary search trees are balanced - answerFalse

BST search, insert, and delete operations typically run in time O(d). What is d? -
answerThe depth of the relevant node in the tree

The number of edges from the node to the deepest leaf is called______ of the tree. -
answerHeight

Which of the traversals in the binary search tree gives a sorted list? - answerIn-order

...........of binary tree starts by visiting the root current node, then its left child and then
its right child - answerPreorder traversal

What does the following piece of code do?
public void func (Tree root)
{
func(root.left());
func(root.right());
System.out.println(root.data());
} - answerPost-order traversal

Which of the following problems is not suitable to be solved with a tree? -
answerUndo/Redo operations in a notepad

Written for

Institution
DSA
Course
DSA

Document information

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

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.
Dreamer252 NBursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
485
Member since
3 year
Number of followers
297
Documents
21393
Last sold
1 day ago

4.0

118 reviews

5
63
4
22
3
18
2
2
1
13

Trending documents

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

Frequently asked questions