logo

Crowdly

IN2002 Data Structures and Algorithms (PRD1 A 2024/25)

Looking for IN2002 Data Structures and Algorithms (PRD1 A 2024/25) test answers and solutions? Browse our comprehensive collection of verified answers for IN2002 Data Structures and Algorithms (PRD1 A 2024/25) at moodle4.city.ac.uk.

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

Given the binary tree below what would be the contents of the queue/stack after visiting the node with key 14 using an in-order depth-first traversal?

tree

0%
0%
0%
0%
View this question

What is the definition of a tree's root?

View this question

What is the space complexity of performing a breadth-first traversal of a binary tree with n nodes?

View this question

Given the algorithm bla, the binary tree and the pointer p below, what would be a call to bla( p ) return?

Function bla(TreeNode b)

     IF b = NULL

          return 0

     return bla( b.right ) + bla( b.left ) + 1

0%
0%
0%
0%
View this question
How much memory - in Big-Oh notation - is needed to store n numbers in an array?

View this question
What is the range of values computed by the hash function hash(x)= x mod 100?

View this question
Suppose we are implementing linear probing on a hash table with 100 slots and with a hash function hash(x) = x mod 100. An element with key 5498 is to be inserted and the first three locations attempted are already occupied. What is the next location that will be tried?

0%
0%
0%
0%
View this question
Suppose we are implementing quadratic probing on a hash table with 71 slots and with a hash function hash(x) = x mod 71. An element with key 63 is to be inserted and the first three locations attempted are already occupied. What is the next location that will be tried?

0%
0%
0%
0%
View this question
What is Chaining in a Hash Table?

View this question

Which type of tree traversal does not use a stack?

View this question

Want instant access to all verified answers on moodle4.city.ac.uk?

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