原创 Binary Search_278_First Bad Version

Binary Search 278 First Bad Version Regular binary search question, provide python solution below# first version 32mscl

原创 兩種方法解決 Leetcode167. Two Sum II - Input array is sorted

1. 雙指針:class Solution: """ @param nums: an array of Integer @param target: target = nums[index1] + nums[ind

原创 Partition方法(同向/雙向雙指針)解決 215. Kth Largest Element in an Array

1. quickselect. (相向雙指針)。原理和partition裏講的一樣。class Solution(object): def findKthLargest(self, nums, k): """