http://shihyu.github.io/books/index.html
https://medium.com/swlh/my-preparation-journey-for-google-interviews-f41e2dc3cdf9
http://shihyu.github.io/books/index.html
https://medium.com/swlh/my-preparation-journey-for-google-interviews-f41e2dc3cdf9
Input: n = 4, k = 2思路:
Output:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],
[1,4],
]
Input: [1,2,3]思路:
Output:
[
[1,2,3],
[1,3,2],
[2,1,3],
[2,3,1],
[3,1,2],
[3,2,1]
]