Combinations - 1
medium
1. You are give a number of boxes (nboxes) and number of identical items (ritems). 2. You are required to place the items in those boxes and print all such configurations possible. Items are identical and all of them are named 'i'. Note 1 -> Number of boxes is greater than number of items, hence some of the boxes may remain empty. Note 2 -> 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.
Constraints
0 < nboxes <= 10 0 <= ritems <= nboxes
Format
Input
Input is managed for you
Output
Check the sample ouput and question video. - means empty box, i means occupied by item.
Example
Sample Input
5
3
Sample Output
iii--
ii-i-
ii--i
i-ii-
i-i-i
i--ii
-iii-
-ii-i
-i-ii
--iii
Question Video