var makeGood = function (s) {
const stack = [];
for (const char of s) {
if (
stack.length &&
Math.abs(char.charCodeAt() - stack[stack.length - 1].charCodeAt()) === 32
) {
stack.pop();
} else {
stack.push(char);
}
}
return stack.join('');
};
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)