0
0
HLDsystem_design~10 mins

Storage access patterns in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the storage access pattern used for sequential reads.

HLD
if access_type == [1]:
    print("Sequential read detected")
Drag options to blanks, or click blank then click option'
Abatch
Brandom
Csequential
Dstreaming
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing sequential with random access.
2fill in blank
medium

Complete the code to select the best storage type for random access patterns.

HLD
if access_pattern == 'random':
    storage = [1]
Drag options to blanks, or click blank then click option'
Assd
Btape_drive
Coptical_disk
Dmagnetic_tape
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing tape or optical disk which are slow for random access.
3fill in blank
hard

Fix the error in the code that incorrectly identifies batch access pattern.

HLD
if access_pattern == [1]:
    process_batch()
Drag options to blanks, or click blank then click option'
Astreaming
Bbatch
Crandom
Dsequential
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing batch with streaming or sequential.
4fill in blank
hard

Fill both blanks to complete the dictionary comprehension that maps storage types to their typical access patterns.

HLD
storage_access = {"SSD": [1], "Tape": [2]
Drag options to blanks, or click blank then click option'
A"random"
B"sequential"
C"batch"
D"streaming"
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the access patterns for SSD and Tape.
5fill in blank
hard

Fill all three blanks to complete the code that filters storage devices by access pattern and capacity.

HLD
filtered_devices = [device for device in devices if device.access == [1] and device.capacity [2] [3]]
Drag options to blanks, or click blank then click option'
A"sequential"
B>
C1000
D"random"
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong access pattern or comparison operator.