Question bank › Recursion
Dsa Recursion Warm-up

String Character Flip Count

You are given a string and a character. Your goal is to determine how many times the character appears in the string by using a recursive approach. Input Format: A single line containing the string followed by a space and then the character. Output Format: An integer representing the number of occurrences of the character in the string. Example: Input: hello world l Output: 3

Key concepts

recursionstringscounting

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.