Hello, Topic: Computer Science Q: What is the time...
# science
s
Hello, Topic: Computer Science Q: What is the time complexity of the standard library filter function? Context: I wrote an algorithm for Quick Sort but for large data sets I'm getting Time Limit Exceeded. Algorithm
i
Hello. Complexity of filter is linear. But there are too many memory allocations in your implementation, that's why your solution is expected to be slow. Moreover, it's better to choose another strategy for finding pivot: it's easy to construct an array which will result in O(n^2).