โ† Amazon questions

Course and student enrollment data structure

Filed under Amazon

The question

Design a data structure to manage courses and enrolled students, supporting insertion, deletion, lookup of a (courseid, enrolment no) pair, and retrieving the last enrolled student for a course, all in O(1) time.

No write-up yet. Related questions below have one.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.