Implement Quicksort in C?

I really like the function qsortin C. It is so easy to use and allows me to delay learning the types of C ++ templates. I have a few questions about this:

  • Is the algorithm always used for quick sorting or does it depend on its implementation?
  • Do you recommend using this feature or is there a real benefit for templates?
  • Are there any things I should keep an eye on to avoid security issues / segfaults?
+3
source share
1 answer

Is the algorithm always used by quick sorting or is it implementation dependent?

It depends on the implementation.

?

C . C, qsort - .

++, std::sort, .

- , , /segfaults?

(, ), ( ). , qsort; , .

+5

Source: https://habr.com/ru/post/1759717/


All Articles