Back to discussionComment by 171243[-]1712436 years ago3 replies#input: "bcabc" 1. "b" 2. "bc" 3. "bca" 4. "bca" 5. "bca" What am I missing?MaximumYComb6 years ago#Nothing. I hadn't fleshed out my idea yet and that's the error I thought could exist. My solution is wrong.kangnkodos6 years ago#Take all the possible answers with duplicates removed, and return the first one in alphabetical order.input: "bcabc"output: "abc"pizza_dave6 years ago#that is a single line of code in javascript, assuming you just want the value in #5 const foo = [...new Set('bcabc'.split(''))].join('')
1712436 years ago3 replies#input: "bcabc" 1. "b" 2. "bc" 3. "bca" 4. "bca" 5. "bca" What am I missing?
MaximumYComb6 years ago#Nothing. I hadn't fleshed out my idea yet and that's the error I thought could exist. My solution is wrong.
kangnkodos6 years ago#Take all the possible answers with duplicates removed, and return the first one in alphabetical order.input: "bcabc"output: "abc"
pizza_dave6 years ago#that is a single line of code in javascript, assuming you just want the value in #5 const foo = [...new Set('bcabc'.split(''))].join('')
input: "bcabc"
output: "abc"