dailycodebase

2 month data structures and algorithmic scripting challenge starting from 20th December 2018 - Coding is Fun! 💯💯 Do it everyday!! Also, Do give us a ⭐ if you liked the repository

View on GitHub

cover

Day 23 - Array Series Part 6: Combination Sum

Question Credits – Geeks4Geeks

Question – Given a set of integers, and a number, find all unique combinations in the integer array whose sum equals the given number.

Example

input: arr = [2,3,6,7], num = 7
output: Solution set -
[
    [7],
    [2,2,3]
]

input: arr = [2, 4, 6, 8], num = 8
output: Solution set -
[
    [2, 2, 2, 2]
    [2, 2, 4]
    [2, 6]
    [4, 4]
    [8]
]

ques

Solution

JavaScript Implementation

Soluion

to be added