https://leetcode.com/problems/remove-one-element-to-make-the-array-strictly-increasing/


Runtime: 144 ms, faster than 14.03% of TypeScript online submissions for Remove One Element to Make the Array Strictly Increasing.

Memory Usage: 49.4 MB, less than 19.30% of TypeScript online submissions for Remove One Element to Make the Array Strictly Increasing.


```typescript
function increased(nums: number[]): boolean {
    let lastOne = null
    for (const num of nums) {
        if (lastOne != null) {
            if (lastOne >= num) {
                return false
            }
        }
        lastOne = num
    }
    return true
}

function canBeIncreasing(nums: number[]): boolean {
    //8:11
    for (const [index, num] of nums.entries()) {
        const newNums = [...nums]
        newNums.splice(index, 1)
        const result = increased(newNums)
        //console.log(nums, newNums, index, result)
        if (result) {
            return true
        }
    }
    return false
    //8:16
    //debug until 8:26, splice won't return usable result
};
```
