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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started