Blood Bank Donation Fulfillment Optimization
Blood Bank Donation Fulfillment Optimization
Bangalore's Red Cross blood bank tracks inventory by expiry date and blood type compatibility. Maximize the number of compatible donation requests fulfilled without exceeding shelf life constraints. Rule: a donation can fulfil a request only if blood groups match exactly and its expiryDays > 0. Each donation fulfils at most one request. Return the maximum number of requests fulfilled. Your solve(...) function receives the inputs as ready-made arguments — no input reading or parsing needed; just return the answer.
Approach
Given donation expiry dates, blood types, and compatible requests, maximize fulfilled donations.
Input
Output
More Arrays problems
Browse all coding problems →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