Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Aggregate purchase logs to build per-user profiles tracking activity days, distinct order types, and spending ranges.
Filter users appearing on both days who have transacted in at least two different order categories.
Calculate a composite trust score based on historical order type familiarity and amount consistency relative to past min/max bounds.
What This Tests
Using hash maps and sets for efficient data aggregation and lookups.
Performing set intersections and filtering based on aggregated criteria.
Implementing mathematical scoring logic with bounds checking and percentage calculations.
Handling string-to-number conversion and lexicographical sorting.
Common Patterns
Hashing
Sorting
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
python
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected