Skip to content

Instantly share code, notes, and snippets.

View jooyous's full-sized avatar
🐘

Julia Matsieva jooyous

🐘
View GitHub Profile

Question

Given a JSON file that contains American Indian reservation records, write a function get_reservations, which, when given exactly one of placeCode, stateCode or aiaNNHCE 1, will return a list of reservations with this property.

Requirements:

  1. The given data should be loaded one time.
  2. get_reservations should use the data to give the answer in constant (O(1)) time.

Example

get_reservations called with place code "14860" should return