-
Notifications
You must be signed in to change notification settings - Fork 9
[김주혜] 17주차 20055번 과제 제출합니다. #118
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
base: main
Are you sure you want to change the base?
Conversation
17주차/20055/20055_python_kimjoohye.py
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.
회전을 pop()을 이용해서도 구현이 가능하겠군요! 자료구조를 잘 써야하는 문제였던거 같아요 ..
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.
파이썬에서는 list.insert(0)의 경우 O(N)이 소요됩니다. 앞과 뒤에 append를 빠르게 (O(1))할 수 있는 collections.deque를 활용하면 될 것 같아요! deque.rotate()를 통해서 회전도 가능하다는 장점이 많습니다.
from collections import deque
17주차/20055/20055_python_kimjoohye.py
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.
저는 이 조건을 아예 while문 조건에 추가했습니다!
17주차/20055/20055_python_kimjoohye.py
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.
저는 numpy를 코딩 테스트에 써본 적이 없었는데 파이썬인 만큼 이런 라이브러리 활용을 잘해야 되겠다고 느꼈습니다..
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.
회전하는 함수가 numpy에 존재하는지 몰랐습니다...
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.
pad를 하게되면 어떻게 lock이 변화하나요 ?
donghoony
left a comment
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.
몇가지 개선할 수 있는 사항들을 리뷰해드립니다. 고생하셨어요!
17주차/20055/20055_python_kimjoohye.py
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.
파이썬에서는 list.insert(0)의 경우 O(N)이 소요됩니다. 앞과 뒤에 append를 빠르게 (O(1))할 수 있는 collections.deque를 활용하면 될 것 같아요! deque.rotate()를 통해서 회전도 가능하다는 장점이 많습니다.
from collections import deque
17주차/20055/20055_python_kimjoohye.py
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.
로봇이 N에서 내린다는 점을 감안해서 뒤쪽부터 봐주면 되는 관찰이 이번 문제의 핵심이었던 것 같습니다 💯
17주차/20055/20055_python_kimjoohye.py
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.
제한이 작아서 괜찮지만, 매번 count를 하는 것도 O(N)으로 큰 제한에서는 부담이 될 수 있습니다. 따로 내구도가 0이 될 때마다 카운트하는 변수를 만들면 부하를 줄일 수 있겠네요!
No description provided.