leetle

Daily challenge for 2025-07-06

187. Count Character Occurrences

Write a function solve that takes a string s and a single character ch and returns how many times ch appears in s. The comparison should be case-sensitive.

Example:
Input: s = "hello", ch = "l"
Output: 2

Run this challenge interactively in Python or JavaScript when the app loads.