今際の国の呵呵君
Wednesday, December 19, 2018
[LeetCode]Two Sum II - Input array is sorted
因为input是sorted的,所以我们用双指针即可解决这道题。时间复杂度O(N),常数空间,代码如下:
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment