it should be true..

The Gateway to Computer Science Excellence

0 votes

**If both of the algorithms A and B need O(nlogn) time then they
both are equally efficient and finish in same amount of time.**

**TRUE OR FALSE**

0

what happens if we take A = O(n) and B = O(n log n), then also given statement is true?

Otherwise i can't take like that?

+2

for(i=0;i<n;i++)

{

count++;

}

time complexity is O(n) =O(n^{2}) =O(n^{3})

But we generally denote with O(n) but it doesn't mean T(n) = O(n^{2}) is wrong., it is also correct.

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,321 answers

198,387 comments

105,140 users