반응형

 

오늘 풀 문제는 Goal Parser Interpretation라는 문제이며

링크는 leetcode.com/problems/goal-parser-interpretation/입니다

 

 

각각에 해당하는 문자들을 치환해주면 되는 문제로 replace를 사용하였습니다

func interpret(command string) string {
    replacer := strings.NewReplacer("()", "o", "(al)", "al")
    return replacer.Replace(command)
}

 

  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기