Valid Split Index
Given an array of integers, find the smallest index where the array can be split such that the product of the elements before the split and the product of the elements after the split are coprime. Print the index of the smallest valid split, or -1 if no such split exists.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)