Available question text
Given purchase records (user_id, purchase_date), identify users who have any two purchases within a 7-day window—i.e., any pair of that user's purchase dates differ by at most seven days. This requires grouping by user and detecting date pairs via sorting/sliding-window or equivalent SQL window/self-join logic.
Related questions
Continue with questions that share topics or the same question type.
- Capacity To Ship Packages Within D Days
Coding · Array · Binary Search
- Check If Two Points Are Connected Within Tower Networks
Coding
- Maximize Amount After Two Days of Conversions
Coding
- Number of Days Between Two Dates
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2228. Users With Two Purchases Within Seven Days
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source