How to do iterative quicksort without using stack

2019-10-09 07:06发布

First of all does C have a stack class?

Second How can I do a method to do quicksort in C without using stack and recursion?

If there is no way to do it without stack can you give me a code for it?

标签: c
1条回答
家丑人穷心不美
2楼-- · 2019-10-09 07:35

First of all does C have a stack class?

C does not provide a stack class, that's up to you to code.

Second How can I do a method to do quicksort in C without using stack and recursion?

Searching through the internet I found this guy that made a non recursive, non stack quicksort. Looks pretty compact so be careful when reading. Here's the link.

If there is no way to do it without stack can you give me a code for it?

This one I think is already aswered.

查看更多
登录 后发表回答