【华为OD机试模拟题】用 C++ 实现 - 货币单位换算(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 选座位(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 停车场最大距离(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 重组字符串(2023.Q1) 【华为OD机试模拟题】用 C++ 实现 - 时间格式化(2023.Q1)
77. 组合
leetcode题目链接:https://leetcode.cn/problems/combinations/
leetcode AC记录:
代码如下:
public List<List<Integer>> combine(int n, int k) {List<List<Integer>> res new ArrayList<>(16…