Back to problems

Design an Event Store with CRUD and Sorted Insert (Binary Search) + Pagination

Object-Oriented Programming · Lead Bank · Medium

Problem: Implement an Event Store (CRUD + Sorted by start_time + Pagination) You are given an Event class with the following attributes: start_time end_time event_name Implement an in-memory event manager (e.g., EventStore) that maintains a list of events. Requirements Sorting invariant The internal events list must always be sorted by start_time in ascending order. When creating a new event, you must use binary search to find the insertion index and insert the event to keep…

Loading the rest of the question…