Implement Previous/Next Lookup by ID in an Array of Records

Problem: Previous/Next ID Lookup in an Array of Records

You are given a list records, where each record is an object/dictionary containing at least:

  • id: a string identifier (unique)
  • other...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: