Partition Array – Python 3 (Week 14 – 18)

class Solution: “”” @param nums: The integer array you should partition @param k: An integer @return: The index after partition “”” def partitionArray(self, nums, k): # write your code here start, end = 0, len(nums) – 1 while start <= end: while start <= end and nums[start] < k: start += 1 while start <= …

Create your own website, free on WordPress.com.Create your own website.
Start free