Skip to content
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

[Queue] bj2164 카드2 / bj1158 요세푸스 문제 #3

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

loveitall
Copy link
Collaborator

📒 문제번호 :

[bj2164] - 카드2
image

[bj1158] - 요세푸스문제
image

☑️ PR Point

  • deque에 대해서 더 알게된 것 같습니다! 일반적으로 입력 받아서 실행하면 런타임에러가 뜨는데, 이걸 쓰면 시간 단축이 되더라구요!!
  • 요세푸스 문제에서 배열 출력 변환하는 과정을 통해 replace()의 존재를 알 수 있었습니다!
  • 요세푸스 문제는 좀 더 간단하게 풀 수 있을 거 같기도 한데...더 고민해볼게요!

⏱️시간복잡도

2164 : O(N)
1158 : O(N log N)

@loveitall loveitall added the label Feb 7, 2023
@loveitall loveitall requested a review from a team as a code owner February 7, 2023 19:28
@loveitall loveitall requested review from skylartosf, wkdyujin and IslandofDream and removed request for a team February 7, 2023 19:28
Copy link
Member

@IslandofDream IslandofDream left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했습니다!

Comment on lines +20 to +22
# 맨 윗쪽 카드 버려라
queue.popleft()
# 맨 윗쪽 카드 제일 아래로 옮겨라!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼한 주석 좋아요

Copy link

@wkdyujin wkdyujin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿입니다 ♡

end.append(seat.popleft())


print(str(end).replace('[', '<').replace(']', '>'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 간단한 방법이...

Copy link

@skylartosf skylartosf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최고다 ❤️

@loveitall loveitall self-assigned this Feb 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants