-
Notifications
You must be signed in to change notification settings - Fork 30
Closed
Description
Good morning! Here's your coding interview problem for today.
This problem was asked by Facebook.
You have a large array with most of the elements as zero.
Use a more space-efficient data structure, SparseArray, that implements the same interface:
init(arr, size): initialize with the original large array and size.
set(i, val): updates index at i with val.
get(i): gets the value at index i.
Metadata
Metadata
Assignees
Labels
No labels