⌘K
Flycodx

Hindu Festival Calendar Month Count

Hindu Festival Calendar Month Count

EasyArrays100% accepted

Arjun manages a Hindu temple's festival calendar. He needs to count festivals falling within a given month range to allocate priests and resources.

Approach

Given an array of festival months and range [start, end], count festivals within that range.

Input

festivals=[1,3,3,5,6,6,9,10], start=3, end=6

Output

5
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
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3