Combinations - Coddicted

Combinations

Title: Combinations Source: leetcode.com

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:

Python solution (a)

Python solution (b)


Back To Top
Rate this post

Leave a Reply