Housing Society Flat Allotment Matcher
Housing Society Flat Allotment Matcher
EasyArrays100% accepted
Amit is secretary of a Bangalore housing society. There are N vacant flats with specific carpet areas, and M residents seeking flats. Each resident has a preferred flat area requirement. Count how many residents can get their exact preferred flat size.
Approach
Given array of N flat areas and array of M resident preferences, count matching allocations.
Input
flats=[500,600,500,700]
preferences=[500,600,800]
Output
2
More Arrays problems
Browse all coding problems →solution.py
Loading editor...
Test 1
Test 2
Test 3
Press Run to test your custom input, or Submit to judge against all test cases.
Sign in to continue
Create a free account to run code, submit solutions and track progress.
- Free forever — no credit card
- 10+ languages with live execution
- Points, streaks & leaderboards