【每日一题】3.20 combinations
亲爱的牛客们~
又到了【每日一题】的时候啦,昨天的题目你思考的肿么样了呢?
大家不妨练习一下,欢迎来讨论区和大家一起讨论哟~
今天的题目是这样滴:
【每日一题】0320
[编程题]combinations
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4
and k = 2, a solution is:
[ [2,4], [3,4], [2,3], [1,2], [1,3], [1,4], ]
大家可以在下面链接直接在线编程训练哦:
欢迎大家认真思考,积极讨论~
也欢迎高手们把题目翻译成中文,翻译的“信达雅”有奖哟~