DEV Community

Discussion on: Can you solve this interview problem?

 
0shuvo0 profile image
Shuvo

It works
Pro tip: you can optimize it by first getting the permutation of the array