-
Notifications
You must be signed in to change notification settings - Fork 0
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
Stack 2개로 Queue 구현하기 #6
Comments
장점JavaScript의 경우 list에서 shift 메서드로 dequeue처럼 사용할 수 있다. 이 경우 O(N)의 시간복잡도를 가진다. 만약 list를 Stack처럼 2개를 사용하여 Queue를 구현하게 되면 dequeue할 때 O(1)의 시간복잡도일 것이다. 이것이 장점 중 하나라고 유추했다. 아직 정확한건 모르겠다. 면접에서 어떻게 대답해야할까? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WIP
The text was updated successfully, but these errors were encountered: