K-partitions

easy
1. You are given two integers n and k, where n represents number of elements and k represents 
     number of subsets.
2. You have to partition n elements in k subsets and print all such configurations.

Note -> Check out the question video and write the recursive code as it is intended without 
               changing signature. The judge can't force you but intends you to teach a concept.

Input Format

A number n A number k

Output Format

Check the sample ouput and question video.

Constraints

1 <= n <= 10
1 <= k <= 10

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
3
2
Output
1. [1, 2] [3] 
2. [1, 3] [2] 
3. [1] [2, 3] 
Previous
Friends Pairing - 2
Next
All Palindromic Permutations

Related Questions