Grokking the Art of Recursion for Coding Interviews
0% completed
17. Good Number
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:
| <span style="white-space:nowrap">Sr</span> # | Input | <span style="white-space:nowrap">Expected</span> Output | Description |
|---|
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%