We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
functionpermutationEquation(p){// Write your code hereletindex1=[];letindex2=[];for(leti=1;i<=p.length;i++){index1.push(p.indexOf(i)+1)}index1.forEach(index=>{index2.push(p.indexOf(index)+1)})returnindex2;}
Cookie support is required to access HackerRank
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 →
Javascript