📜  在java程序中增加元素而不进行任何替换 - Java代码示例

📅  最后修改于: 2022-03-11 14:52:32.255000             🧑  作者: Mango

代码示例1
Abhijit has an Array Arr which may or may not be in strictly increasing order. He wants to make this array increasing but does not wish to change the position of any element so he came with an idea that he will replace an element with any of its divisors i.e he changes an element X to M if X%M=0.

Your task is to tell whether the given array can be transformed to strictly increasing by performing the operation given above.