The output of the JS implementation gives duplicated solutions. Input: findSubarrays([2, 5, 3, 10], 30) Output: [ [ 2 ], **[ 2, 5 ], [ 2, 5 ],** [ 5, 3 ], [ 5, 3 ], [ 10 ] ] Amazing repo, btw! Thank you very much for sharing this content.