思路: https://www.cnblogs.com/jingjingblog/p/9117779.html. 链接: https://blog.csdn.net/zml66666/article/details/102675451?ops_request_misc=&request_id=&biz_id=102&utm_term=46.%20Permutations%20c++&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-5-102675451.pc_search_result_cache. dfs+swap: https://blog.csdn.net/Ethan95/article/details/84593429?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522161570662516780261928104%2522%252C%2522scm%2522%253A%252220140713.130102334…%2522%257D&request_id=161570662516780261928104&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2allbaidu_landing_v2~default-3-84593429.pc_search_result_cache&utm_term=46.+Permutations+c%2B%2B. dfs: https://blog.csdn.net/weixin_42939835/article/details/109163441?ops_request_misc=&request_id=&biz_id=102&utm_term=46.%20Permutations%20c++%E3%80%82%20swap&utm_medium=distribute.pc_search_result.none-task-blog-2allsobaiduweb~default-8-109163441.pc_search_result_cache. 链接: link.