Solution1 前缀和 + 二分查找

  • 时间复杂度

    • 构造函数 $O(n)$

    • pickIndex $O(logn)$

  • 空间复杂度 $O(1)$

Last updated