Single Choice Easy

QHow is the time complexity of the counting sort algorithm characterized?

ID: #21519 Time Complexity 102 views
Question Info
#21519Q ID
EasyDifficulty
Time ComplexityTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A O(N) ✔ ✖
  • B O(log N) ✔ ✖
  • C O(N^2) ✔ ✖
  • D O(N + k), where k is the range of input values. ✔ ✖
Correct Answer

Explanation

Counting sort has a time complexity of O(N + k), where N is the number of elements and k is the range of input values.

Share This Question

Challenge a friend or share with your study group.