0

14. Write a JavaScript function to get all possible subset with a fixed length (for example 2) combinations in an array. Sampl

14. Write a JavaScript function to get all possible subset with a fixed length (for example 2) combinations in an array. Sample array : [1, 2, 3] and subset length is 2 Expected output : [[2, 1], [3, 1], [3, 2], [3, 2, 1]] . . Ù‡Ű°Ű§ Ű§ŰŽÙ„ÙˆÙ† ÙŠÙ†Ű­Ù„ ÙŰŻÙˆŰ© لي يŰčŰ±Ù ÙŠŰ­Ù„Ù‡Ű§ ...

8th Dec 2016, 9:39 PM
Nashwan Aziz
Nashwan Aziz - avatar
1 Answer
0
14. Write a JavaScript function to get all possible subset with a fixed length (for example 2) combinations in an array. Sample array : [1, 2, 3] and subset length is 2 Expected output : [[2, 1], [3, 1], [3, 2], [3, 2, 1]] . .
8th Dec 2016, 9:40 PM
Nashwan Aziz
Nashwan Aziz - avatar