DrawCode Practice Problem

Previous-Event Amount Delta · Fraud alerts 71

Fraud alerts DataFrame, variant 71. For each user, return user_id, id, and amount_delta from the previous event; use 0 for the first event. Implement `solve(df)` and return a PySpark DataFrame.


Interactive Visualizer Workspace

Explore step-by-step interactive animations, memory state tracking, and live multi-language execution in DrawCode.

Launch Interactive Visualizer