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

김지수: 햄버거 분배 #272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soojik
Copy link
Contributor

@soojik soojik commented Aug 29, 2023

📖 풀이한 문제


💡 문제에서 사용된 알고리즘

  • Queue
  • 그리디

📜 코드 설명

  • 사람, 햄버거 위치 정보가 담긴 persons, hamburgers 라는 이름의 Queue 를 만들어 준다.
  • 각 큐에서 인덱스 정보를 하나씩 꺼내 햄버거 위치가 사람이 닿을 수 있는 위치인지 여부에 따라 answer 에 1씩 더해준다.

close #271

@soojik soojik added this to the 8월 5주차 milestone Aug 29, 2023
@soojik soojik requested review from j2woo and SollyJ August 29, 2023 16:14
@soojik soojik self-assigned this Aug 29, 2023
@soojik soojik requested a review from a team as a code owner August 29, 2023 16:14
static int N, K;
static String table;
// 사람과 햄버거 인덱스만 모아놓은 Queue<Integer> persons, hamburgers
static Queue<Integer> persons = new LinkedList<>();
Copy link
Member

Choose a reason for hiding this comment

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

사람과 햄버거를 queue에 넣으신 거 좋습니다!

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

Successfully merging this pull request may close these issues.

[김지수] 햄버거 분배
2 participants