Find the factorial of a number using recursion.
Difficulty: Medium
Phase: 6 · Mixed Logical Challenges
XP Reward: 20 XP
Topics: Mixed Logical Challenges, Medium
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Given N, print an N x N grid with zigzag (snake) row traversal numbering. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: 3
Output: 1 2 3 6 5 4 7 8 9
Explanation: Sample execution for input 3