Library Book Length Filter
Library Book Length Filter
MediumArrays0% accepted
Meera manages Delhi Public Library's fiction section and needs to create a 'perfect weekend reads' list by finding all books with exactly N pages for busy professionals.
Approach
Given an array of book page counts and target page count N, return indices of all books with exactly N pages.
Input
pages=[200,350,200,450,200], target=200
Output
[0,2,4]
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