Hard questions are the classic patterns of event data: sessions from clicks, streaks of consecutive days, cohort retention, the latest record per key. Each has a standard shape built from tools you know (lag(), cumsum(), diff(), ranking with a tie-breaker), and each has a boundary the interviewer will ask about: a gap of exactly 30 minutes, two logins on the same day, two updates with the same date.
Before you write code, state the rule for the boundary. Then check the answer by hand on one user or one customer.