Attendance Streak
A string contains `P` for present and `A` for absent across several sessions. Find the longest consecutive run of `P`.
Open problemProblems
Build problem-solving habits with topic filters, difficulty levels, visible examples, and an online code workspace.
Choose a Python Foundations, coding practice, or PCEP review path and work through problems in order.
Difficulty
Showing 10 of 30 problems
Clear filtersA string contains `P` for present and `A` for absent across several sessions. Find the longest consecutive run of `P`.
Open problemGiven a list of route stop names and a school name, print `YES` if the school appears in the route and `NO` otherwise.
Open problemTrack passengers on a bus after a sequence of stops.
Open problemFind the longest streak of days with temperature at least 30.
Open problemGiven item cost and cash paid in Jamaican dollars, output the minimum number of bills/coins for the change using denominations 5000, 1000, 500, 100, 50, 20, 10, 5, and 1.
Open problemGiven skill scores for students, sort them and print the difference between the highest and lowest score.
Open problemEach mentor group can hold `k` students. Given `n` students, print the minimum number of groups needed.
Open problemAnswer range sum queries on a list using 1-based inclusive indexes.
Open problemGiven `n` project tags and one target tag, count how many times the target appears.
Open problemGiven attendance counts for sessions and a range `l` to `r`, print the total attendance in that inclusive range.
Open problem