Skip to content

[6 KYU] Backspaces in string (Solution) #142

@Hycord

Description

@Hycord

I decided to use typescript.

export function cleanString(s: string): string {
  let ret: string[] = [];
  
  s.split("").forEach(r => {
    if(r == "#"){
      ret.pop();
    } else ret.push(r);
  })
  
  return ret.join("");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions