Grokking the Art of Recursion for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
Solution: Good Number
On this page

Problem Statement

Write a Recursive Approach to Check if a Given Digit String Represents a Good Number.

A digit string is good if the digits (0-indexed) at even indices are even and the digits at odd indices are prime ((2, 3, 5, or 7).

Examples:

| Sr # | Input | Expected Output | Description |

.....

.....

.....

Like the course? Get enrolled and start learning!

On this page