APL Problem Solving Competition 2022 Problem 3 Task 1 Full APL Solution
summary
Function builds a Boolean attendance matrix: one row per person, one column per session, marking 1 when total connected time for that person during a session is at least half the session duration. It uses Dyalog APL utilities like ]LINK and ]Get, numeric parsing with ⎕VFI and ⎕DT, and array math via key operator and outer product to sum per-person overlaps. Fix sums multiple join/leave segments (edge case) and uncovers eight differing cases versus the earlier version; attended2 matches the judged solution.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 2:25The problem and data
- 4:15Loading data and code with ]LINK and ]Get
- 8:33The result of the function
- 9:40Using the editor and tracer
- 10:28Selecting data by column name
- 14:25Searching for strings in a list of strings
- 22:10Split columns into lists
- 24:20Converting US-style date time text to Unix time number
- 43:08Handling empty values
- 50:48Computing overlap between attendee connections and session durations
- 55:43Adding up total overlap for each person
- 58:30Computing the attendance matrix
- 1:01:30Bracket-axis vs rank operator
- 1:04:45Sorting by attendee name
- 1:13:16Quality of APL code
- 1:17:58The edge case I missed
