Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combinations #381

Open
lelchan opened this issue Oct 8, 2019 · 3 comments
Open

Combinations #381

lelchan opened this issue Oct 8, 2019 · 3 comments
Labels
enhancement New feature or request hacktoberfest-accepted Hacktoberfest! help wanted Extra attention is needed

Comments

@lelchan
Copy link

lelchan commented Oct 8, 2019

You are given an array with random integers. Design an algorithm that returns a list of arrays with all the possible combinations of the numbers in the array.
This means if the input is [1,2,3], the output will be [[1],[2],[3],[12],[13],[23],[123]].

Some solutions might be faster than others but speed does not matter.

@wzhouwzhou wzhouwzhou added enhancement New feature or request hacktoberfest-accepted Hacktoberfest! labels Oct 8, 2019
@wzhouwzhou wzhouwzhou added this to To do in Hacktoberfest 2019 via automation Oct 8, 2019
@wzhouwzhou wzhouwzhou pinned this issue Oct 8, 2019
@yashagarwal1999
Copy link
Contributor

Solved it Please check if changes let me know
#383

@wzhouwzhou
Copy link
Owner

Please see my comments

@wzhouwzhou wzhouwzhou added the help wanted Extra attention is needed label Oct 12, 2019
kannagikazuko added a commit that referenced this issue Oct 17, 2019
Solved Issue Combinations #381 as powerset.cpp
@DiscoTiger
Copy link

DiscoTiger commented Oct 24, 2019

Solved it in Javascript. This kind of combination is known as a power set and I found more information about it on wikipedia.

It's very inefficient but that's usually the case with complex javascript one-liners. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest-accepted Hacktoberfest! help wanted Extra attention is needed
Projects
Development

No branches or pull requests

4 participants