We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
比较简单的贪心法。我们从做往右每遍历一个元素,都可以动态地更新未来的右边界。直到我们遍历到右边界位置无法前进的时候,仍然没有走到数组的最后一个位置,就返回false。