Algorithm · Dropbox · Medium
Problem You are given a list of worker event records. Each record represents either a clock-in, a clock-out, or a worker registration. Compute each worker's total payable wages by processing the events according to the pay rules. Events may include: "clock_in" — the worker starts working. "clock_out" — the worker stops working. "register" — optional worker registration; it does not affect worked time. Implement the following function: Input events: a list of event objects.…
Checking your access…