Skip to content

[문의] P.148 / 03. 로그 파일 재정렬 #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mochafreddo opened this issue Jan 13, 2021 · 4 comments
Closed

[문의] P.148 / 03. 로그 파일 재정렬 #77

mochafreddo opened this issue Jan 13, 2021 · 4 comments

Comments

@mochafreddo
Copy link

문제 기준에 작성된 내용은

  1. 식별자는 순서에 영향을 끼치지 않지만, 문자가 동일한 경우 식별자 순으로 한다.

인데 리트코드에는

The letter-logs are ordered lexicographically ignoring identifier, with the identifier used in case of ties.

라고 나와있습니다.

확인 부탁드려요 :)

@likejazz
Copy link
Collaborator

안녕하세요.

해당 내용은 같은 의미로 적었습니다. 책에 있는 다른 문제의 설명을 보면 아시겠지만 엄밀하게 정의하기 보다는 쉽게 설명하는데 좀 더 집중하였습니다. 이는 원래의 리트코드도 마찬가지이며 엄밀하게 보면 이상해 보이는 문제들도 다수 있으나 상식적인 수준에서 엄밀한 부분들은 쉽게 설명하기 위해 많이 생략하였습니다.

@mochafreddo
Copy link
Author

답변 감사합니다.

저는 letter-log에서 식별자를 제외한 부분이 정렬된다는 내용이 없기 때문에 정렬되지 않도록 방법으로 코드를 구현하게 되었습니다. 그래서 letter-log가 일차적으로 식별자를 제외한 부분이 정렬되고, 문자가 동일한 경우 식별자 순으로 정렬한다고 명시되면 어떨까 하여 여쭙습니다. 원문에서는 명확하게 표기가 되어있어 헷갈리지 않았습니다.

@likejazz
Copy link
Collaborator

likejazz commented Jan 15, 2021

문제 자체가 "로그를 재정렬하라" 입니다. 3번 설명에 정렬이 포함되어 있지 않다고 해서 문자가 동일할때만 정렬해서 풀이한다는게 일반적이진 않은거 같습니다.

@mochafreddo
Copy link
Author

아! 그렇네요 :D
감사합니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants