Question: Question 4: Bitcoin is a digital cash system where a log of all transactions ever made is stored as a (very large) tree data structure.

Question 4:

Bitcoin is a digital cash system where a log of all transactions ever made is stored as a (very large) tree data structure. Each node in the tree represents a transaction, with details of the amount of money involved and the source and destination accounts.

Each node also contains a hash of the contents of its parent node (the most recent transaction before it), to prevent transaction records from being changed later. To verify that nothing has been changed, you start at a leaf node and work towards the root one node at a time, checking that the hashes are correct as you go.

Assume that computing the hash is an O(1) operation. What is the time complexity of verifying the complete history of a Bitcoin transaction?

Question 4 options:

A.

O(1)

B.

O(log N) where N is the height of the tree

C.

O(N) where N is the height of the tree

D.

O(N log N) where N is the height of the tree

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!