Given a sequence of integers as an array, determine whether it is possible to obtain a strictly increasing sequence by removing no more than one element from the array.
Example: For sequence = [1, 3, 2, 1], the output should be almostIncreasingSequence(sequence) = false.
For sequence = [1, 3, 2], the output should be almostIncreasingSequence(sequence) = true
booleanalmostIncreasingSequence(int[] seq) { intcountNoSeq=0; // compare with next element for (inti=0; i < seq.length - 1; i++) { if (seq[i] >= seq[i + 1]) { countNoSeq++; } } // compare with after next element, because removed an element for (inti=0; i < seq.length - 2; i++) { if (seq[i] >= seq[i + 2]) { countNoSeq++; } }