3 ms·
input: "bcabc" 1. "b" 2. "bc" 3. "bca" 4. "bca" 5. "bca" What am I missing?
by 171243 7y ago
input: "bcabc"
1. "b"
2. "bc"
3. "bca"
4. "bca"
5. "bca"
What am I missing?
- MaximumYComb 7y agoNothing. I hadn't fleshed out my idea yet and that's the error I thought could exist. My solution is wrong.
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- kangnkodos 7y agoTake all the possible answers with duplicates removed, and return the first one in alphabetical order. input: "bcabc" output: "abc"
- pizza_dave 7y agothat is a single line of code in javascript, assuming you just want the value in #5 const foo = [...new Set('bcabc'.split(''))].join('')