Skip to content

[FEATURE REQUEST] Backtracking algorithms (All combinations) #3912

@TheClerici

Description

@TheClerici

What would you like to Propose?

I would like to add the all combinations algorithm!

Issue details

Although it is already in another repository from the Algorithms group (Python), I was unable to locate it in the folders (Java).

Additional Information

In this problem, we want to determine all possible combinations of k numbers out of 1 ... n. We use backtracking to solve this problem.

  • Example:

generate_all_combinations(n=4, k=2)
[[1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions