Skip to content

[구현] 프로그래머스#81301 - 숫자 문자열과 영단어 #14

Description

@ye-yo

⚠️ 나의 풀이

  • 한글자씩 비교해가면서 문자를 숫자로 바꾸려고 시도

❗️ 오답 원인 분석

  • 한글자씩 비교하려면 비효율적이고 이중 for문이 될 수 있음

🔑 풀이 핵심

  • 숫자가 한글로 표현된 배열을 돌면서 해당하는 문자를 기준으로 주어진 문자열을 분리
    ex) zero를 기준으로 나누면 zero123의 경우 '', '123'으로 나눠짐
  • 분리된 문자열을 join으로 합치면서 0을 붙여서 합침 => 0123

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

풀이미흡제대로 풀이하지 못함.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions