You are viewing a single comment's thread. Return to all comments →
using reduce in JS/Javascript:-
function permutationEquation(p) { return p.reduce((acc, _, index) => { acc.push(p.indexOf(p.indexOf(index + 1) + 1) + 1) return acc }, []) }
Seems like cookies are disabled on this browser, please enable them to open this website
Sequence Equation
You are viewing a single comment's thread. Return to all comments →
using reduce in JS/Javascript:-