-
Notifications
You must be signed in to change notification settings - Fork 4
[8주차] 이지영 #110
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
[8주차] 이지영 #110
Conversation
while(i >= 0) { | ||
System.out.println("i: "+i); | ||
System.out.println("d: "+Arrays.toString(deliveries)); | ||
System.out.println("p: "+Arrays.toString(pickups)); | ||
|
||
// 배달과 수거 모두 끝난 집은 pass | ||
if(deliveries[i] ==0 && pickups[i] ==0){ | ||
i--; | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 위치를 다음 집으로 옮겨주고, 배달이나 수거를 못마친 집을 재방문하게 하는 부분이 어려웠는데,
저는 while
말구 for문을 썼어서 로직이 지저분 해 졌던거 같네요 ㅜㅜ (그래서 결국 해설을 봐버렸어요)
같은 위치를 다시 방문해야 할 때는 while
과 다음 위치 이동을 위한 조건
로직 을 적절히 사용 해 봐야겠어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 처음에는 배달과 수거를 같이 생각했는데 문제 예시보니깐 따로 생각해야 하더라고요!! 문제를 더 잘 이해하는 것도 중요한 것 같습니다 !! ㅠㅜㅜ
BOJ/1000-5000번/JY_1911.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저도 매개변수 탐색을 생각하긴 했었는데 대단해여
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅎㅎㅎㅎ 결론은 N이 작아 그냥 풀면됐지만,,,, 이분탐색 연습한걸로,,,, ㅎㅎㅎㅎ
BOJ/1000-5000번/JY_2461.java
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 투포인터하면 한줄배열을 떠올리게되는데, 각 반별로 포인터를 둬서 값을 비교해나가는 방법 멋있네요!👍
No description provided.