Posts by user140179 • 31 points
1 post
-
3
votes3
answers689
viewsA: Convert nested loops to recursive function to compute combinations
This is possibly the ugliest and most inefficient code I’ve ever done. Don’t vote for it as correct. But anyway, here’s a suggestion. function all(data, len) { if (!len) return []; if (len === 1)…