edited by
694 views
1 votes
1 votes

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)

edited by

Please log in or register to answer this question.

Related questions

2 votes
2 votes
1 answer
2
2 votes
2 votes
0 answers
3
jaig asked Jan 10, 2018
323 views
For a directed graph, the absence of back edges in a DFS tree can have cycle.true or fale.please explain with an example.