Note the range() function does not include upper bound. so len(nums) is not included.
But in list selection, high need to be exactly len(nums)
Thus error.
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.
2 Responses
But in list selection, high need to be exactly len(nums)
Thus error.
The mid point calculation is O(n)
But recursion is ??
Calculate the time complexity of this algorithm...
Write a comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.