In a galaxy with n planetary systems, space travelers can only jump 3 or 5 systems at a time. Given a final destination, calculate the number of unique routes to reach it.
Explanation: Step-by-step: We can reach the final destination 15 by jumping 3 or 5 systems at a time. The two unique routes are 3+3+3+3+3=15 and 5+5+5=15.
Explanation: Step-by-step: We can reach the final destination 12 by jumping 3 or 5 systems at a time. The only unique route is 3+3+3+3=12.
Master coding challenges related to Recursion and solve the [Backup] Interstellar Route Planner problem optimally.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak