What is the worst case time complexity to count pairs of numbers with difference ‘k’ from an input array of ‘n’ numbers?
a) O(logn)
b) O(nlogn)
c) O(n^2)
d) O(n^2logn)
64.3k questions
77.9k answers
244k comments
80.0k users