logo

Crowdly

Browser

Add to Chrome

ESTRUCTURA DE DATOS

Looking for ESTRUCTURA DE DATOS test answers and solutions? Browse our comprehensive collection of verified answers for ESTRUCTURA DE DATOS at online.upr.edu.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Consider the following instance of BinarySearchTree<Integer> T:

What would be the output if we were to add the elements 21, 78, 47 and then proceed to do a In-Order Traversal on T?

View this question
Consider the following set of operations on a Binary Search Tree T storing strings as both keys and values:

T.add("Apu", "Apu");

T.add("Ron", "Ron");

T.add("Lee", "Lee");

T.add("Joe", "Joe");

T.add("Ken", "Ken");

What would be the output if we printed the content of the BST in in-order traversal?

View this question

Consider the following LinkedBST<Integer, Integer> T:

Suppose a call to T.remove(27) was made, how many nodes (not including itself) do we have to traverse to find its in-order predecessor? Who is it?

View this question

Consider a BinaryTree<Character>  that has the following structure (nodes are empty circles) with a size 10. 

What would be the last character printed by a Post-Order traversal be if the In-Order traversal generates the following output: 

    • B X A C D M L K W Z
0%
0%
0%
0%
0%
View this question

TheTree

Which node is visited after Ned in a Post-Order Traversal? 

View this question

Consider an arbitrary binary tree T that has the following structure:

Assume that an In-Order traversal of its nodes (where each visit just prints out the node's value) produces the following output: 

    • A B C D K L M W X Z

Then what would be the output if the traversal is based on Pre-Order?

0%
0%
0%
0%
View this question

Consider the following binary tree:

Assume every time we visit a node, we print out the value of each node.

What would the output be if we were to traverse this tree using In-Order Traversal?

0%
0%
0%
View this question

The most efficient way to implement the front() method in a DoublyLinkedQueue implementation would be to access the last element in the LinkedList by traversing from header.getNext() to trailer.getPrev()

View this question

If we do the following:

stack1  = {Apu, Jil, Ned, Bob, Ron}

stack2 = { }

while(!stack1.isEmpty())

    stack2.push(stack1.pop());

stack1.push(stack2.pop());

stack2.pop();

stack1.push(stack2.pop());

What is the contents of stack1 and stack2?

0%
0%
0%
0%
View this question

All Stack implementations are efficient! Their push() and pop() operations are always O(1)!

Is this statement true?

0%
0%
0%
0%
View this question

Want instant access to all verified answers on online.upr.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome