【发布时间】:2021-01-07 08:12:56
【问题描述】:
这里有谁能解释我如何在不使用递归的情况下以迭代方法打印字符串数组的排列。请用代码说明。
【问题讨论】:
-
欢迎来到 stackoverflow.com。请花点时间阅读the help pages,尤其是名为"What topics can I ask about here?" 和"What types of questions should I avoid asking?" 的部分。也请采取tour 并阅读How to Ask 好问题。最后请阅读this question checklist。
-
你可以看看
std::next_permutation:en.cppreference.com/w/cpp/algorithm/next_permutation -
@Someprogrammerdude 当我发表这个评论时,标签 C++ 出现了(被 Alan Birtles 删除了?)。此外,该链接提供了一个实现示例。它在 C++ 中,但它可以帮助 OP 在 C 中实现自己的代码
标签: c algorithm recursion permutation