Section 2. Chapter 3
single
Challenge: All Frequent Items
Swipe to show menu
Task
Swipe to start coding
Implement a function to find all single items in the transaction database that are frequent, based on a given minimum support.
- Count the frequency of each individual item across all transactions.
- Return a list of tuples where each tuple is (item, support), for all items with support greater than or equal to the minimum support.
- Sort the result by support in descending order, then by item name lexicographically.
Solution
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 3
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat