Company: Amazon HackOn_30may
Difficulty: medium
Problem Statement You are given a grid with dimensions 2N×2N and a "rider" initially positioned at the top-left corner. The rider moves like a knight in chess, able to move in an L-shape: two s quares in one d irection and one in th e perpe ndicul ar, or vice versa. Yo ur ta sk is to determine how many di stinct paths th e rider ca n take to reach any of the four corner s of t he grid. To solve this, calculate the number of ways the rider can move fro m its starting position to any corners within a maximum of K moves. This requires exploring all pos sible paths while considering the co nstraints of the grid an d ensuring that the total numbe r of m oves d o es not exce ed K. Input Format The dimension parameter N for the grid, where the grid is 2N×2N. The maximum number of moves allowed, K . Output Format The number of distinct paths the rider can take to reach any of the four corners of the grid within K moves. Constraints 1 ≤ N ≤ 10 1 ≤ K ≤ 10 Sample Input 2&#