QUESTION:
2270. Number of Ways to Split Array.md
My Think:
2 <= nums.length <= 105
, 因此我们可以直接获取到第一个数字, 初始状态就在指针于index0, 正要往index1走的时候.
然后只需要一次For循环就可以搞定
重点是第二个方法, 来自题解.
Code:
1 | class Solution: |
1 | t = (sum(nums) + 1) // 2 |
My name is Siz. I am a computer science graduate student specializing in backend development with Golang and Python, seeking opportunities in innovative tech projects. My personal website is me.longsizhuo.com .Connect with me on LinkedIn: https://www.linkedin.com/in/longsizhuo/.
{{ date }}
{{ time }}