Hash Tree Multiple Choice Questions and Answers (MCQs)


This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Hash Tree”.

1. Where is the hash tree used?
A) in digital currency
B) in sorting of large data
C) for indexing in databases
D) in encryption of data

Explanation: Data authentication, data synchronisation, and consistency verification can all be achieved quickly with Hash trees. As a result, the hash tree is used to organise transactions in digital currencies.

2. What is the worst case time complexity of the insertion in the hash tree?
A) O(logk(n))
B) O(n2)
C) O(nlogk(n))
D) O(kn)

Explanation: The key is compressed and hashed to get the slot for the entry when inserting a record in the hash tree. In the worst case, insertion of a hash tree with branching factor k takes O(logk(n)).

3. Sequential access in a Hash tree is faster than in B-trees.
A) True

B) False

Explanation: The hash tree’s sequential access is more stable and quicker than the B- tree’s. Since the file’s expansions and contractions are calculated when building the hash tree.

4. Hash tree is used in data synchronisation. In the worst case the data synchronisation takes ______ time.
A) O(logn)
B) O(n2)
C) O(nlogn)
D) O(n)

Explanation: Since it is dependent on traversal and searching, synchronisation takes O(logn) in most scenarios. When there are no nodes in general, the worst case is that synchronisation takes O(n) time.

5. Hash tree is generalization of ______
A) Heap
B) Hash list
D) B – tree

Explanation: A hash list is a collection of block hashes in a set file. A hash tree is a generalisation of a hash list in which the hash of a data block is labelled on the leaves, and any non-leaf node is a hash of its children’s labels.

6. Hash tree is used in effective data verification in distributed systems.
A) True

B) False

Explanation: In distributed networks, hash trees are used to verify data quickly. Hash trees are effective because they use hashes rather than complete files. Since hashes are used to encode files that are much smaller than the original.

7. Which of the following is a widely used form of the hash tree?
A) B+ – tree
B) T tree
C) Tiger tree hash
D) Htree

Explanation: The Tiger tree hash is the most commonly used general version of the hash tree. It employs the Tiger hash and employs a binary hash tree with a data block size of 1024 bytes.

8. Which of the following is true for a Hash tree?
A) Hashing is used for sequential access
B) Indexing is used for direct access
C) Hash tree allows only sequential access
D) Hashing is used for direct access

Explanation: The records can be accessed directly or sequentially using a hash tree. Direct access is handled by hashing, while sequential access is handled by indexing.

9. Hash tree is also known as _____
A) Merkle tree
B) T -tree
C) Hash table
D) Bx-tree

Explanation: Merkle tree is the common name for the hash tree, which was copyrighted in 1979 by Ralph Merkle. Merkle trees usually have a branching factor of two, meaning that each node can have up to two children. 

10. What will be the height of the hash tree with branching factor 2 and with 8 records?
A) 3
B) 5
C) 4
D) 6

Explanation: Consider 8 records A B C D E F G H. These records are stored in Hash tree in as shown in figure below.


In distributed systems, the hash tree is used for efficient data verification. Hash trees are used in distributed systems to ensure that data is verified efficiently. Hash trees are effective because they use hashes rather than complete files. Hashing is used to make Merkle trees work. It simply repeats the process of hashing pairs of nodes until only one hash value remains. Merkle Root or the Root Hash is the left hash value. Individual transaction hashes are used to construct the tree from the bottom up.

Leave a Reply

Your email address will not be published. Required fields are marked *