Which of the following algorithm takes non linear time for sorting?

Which of the following algorithm takes non linear time for sorting?
A. counting sort
B. quick sort
C. bucket sort
D. radix sort
 
Answer: b
Explanation: Quick sort requires O(n log n) time for sorting so it takes non linear time for sorting whereas counting sort, bucket sort and radix sort sorts in linear time.1. What does the following statement mean?
Code:
int (*fp)(char*)
A. pointer to a pointer
B. pointer to an array of chars
C. pointer to function taking a char* argument and returns an int
D. function taking a char* argument and returning a pointer to int
 

Tìm kiếm

Back
Top