Company: CoinSwitch_2Dec
Difficulty: medium
Prime Jump Navigation Problem Description You are given an array nums of N positive integers representing checkpoints on a number line. You begin at position 0 and must reach position N-1 using the minimum number of moves possible. From any position i , one move is one of the following: Step one position left or right to an adjacent index ( i-1 or i+1 ), as long as it stays inside the array. If the value at your current position, nums[i] , is a prime number p , instantly teleport to any other position j whose value nums[j] is divisible by p . Each step and each teleport counts as exactly one move. Your goal is to find the shortest path from the start (index 0 ) to the end (index N-1 ) using these movement rules optimally. Complete the function minJumps(N, nums) , which receives the array size N and the array nums , and returns the minimum number of moves required to reach index N-1 from index 0 . Input Format Read from standard input. N nums[0] nums[1] ... nums[N-1] The first line cont