mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-07 03:07:46 +08:00
Tighten up psf/black and flake8 (#2024)
* Tighten up psf/black and flake8 * Fix some tests * Fix some E741 * Fix some E741 * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -1,12 +1,15 @@
|
||||
# Python program to print all subset combinations of n element in given set of r element.
|
||||
# arr[] ---> Input Array
|
||||
# data[] ---> Temporary array to store current combination
|
||||
# start & end ---> Staring and Ending indexes in arr[]
|
||||
# index ---> Current index in data[]
|
||||
# r ---> Size of a combination to be printed
|
||||
|
||||
|
||||
def combination_util(arr, n, r, index, data, i):
|
||||
# Current combination is ready to be printed,
|
||||
# print it
|
||||
"""
|
||||
Current combination is ready to be printed, print it
|
||||
arr[] ---> Input Array
|
||||
data[] ---> Temporary array to store current combination
|
||||
start & end ---> Staring and Ending indexes in arr[]
|
||||
index ---> Current index in data[]
|
||||
r ---> Size of a combination to be printed
|
||||
"""
|
||||
if index == r:
|
||||
for j in range(r):
|
||||
print(data[j], end=" ")
|
||||
|
Reference in New Issue
Block a user