You are viewing a single comment's thread. Return to all comments →
const stringConstruction = (originalString) => { try { let tempString = ""; let finalCost = 0; for(let i=0;i<originalString.length;i++) { if(!tempString.includes(originalString[i])) { tempString += (originalString[i]); finalCost += 1; } } return finalCost; } catch (error) { console.log(error.message); } }
Seems like cookies are disabled on this browser, please enable them to open this website
String Construction
You are viewing a single comment's thread. Return to all comments →