edited by
1,468 views
1 1 vote

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)

Please log in or register to answer this question.

Position:
Show:

Related questions

1 1 vote
0 0 answers
824
824 views
2 2 votes
1 1 answer
886
886 views
sumit chakraborty asked Jan 11, 2018
886 views
Consider the following graph and sequences given below :Given answer for no of DFS traversal was 2 : S1 and S2.How S2 is a DFS traversal ?
2 2 votes
0 0 answers
583
583 views
jaig asked Jan 10, 2018
583 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.
1 1 vote
0 0 answers
665
665 views
Abhishek Kumar Singh asked Jan 8, 2018
665 views
A) S1 onlyB) S1 and S2 onlyC) S1 and S3 onlyD) All statements are true.