Filter Products by Price Range
Medium📝 Description
Filter products within a given price range.
Input Format
[ {"name": "Shirt", "price": 20}, {"name": "Jeans", "price": 50} ], min=20, max=40
Output Format
[ {"name": "Shirt", "price": 20} ]
Constraints
List length ≤ 10^5
🔍 Sample Input
[ {"name": "Shirt", "price": 20}, {"name": "Jeans", "price": 50} ], 20, 40
✅ Sample Output
[ {"name": "Shirt", "price": 20} ]
Code Editor
Please login to run and submit code.
Results
Suggested Solution
Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run