Tax Deduction Investment Optimizer
Tax Deduction Investment Optimizer
Meera earns 600,000 annually in Mumbai and wants to minimize tax using Section 80C (max 150k), Section 80D (max 50k), and Section 80E (max 100k). Given available investment amounts in each scheme, find the allocation that maximizes deductions and minimizes taxable income. Rule: each scheme is [name, max_limit, available]; its deduction is min(max_limit, available). Return [totalDeductions, taxableIncome] where taxableIncome = income - totalDeductions. Your solve(...) function receives the inputs as ready-made arguments — no input reading or parsing needed; just return the answer.
Approach
Given annual income and investment schemes [[scheme_name, max_limit, available_amount]], allocate to minimize taxable income.
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