mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
chore: convert functions to an ES2015 classes (#1656)
* chore: convert functions to an ES2015 classes * remove unnecessary functions
This commit is contained in:
@ -4,7 +4,7 @@ determine the total number of the subset with sum
|
||||
equal to the given sum.
|
||||
*/
|
||||
/*
|
||||
Given solution is O(n*sum) Time complexity and O(sum) Space complexity
|
||||
Given solution is O(n*sum) Time complexity and O(sum) Space complexity
|
||||
*/
|
||||
function NumberOfSubsetSum(array, sum) {
|
||||
const dp = [] // create an dp array where dp[i] denote number of subset with sum equal to i
|
||||
|
Reference in New Issue
Block a user