-
Notifications
You must be signed in to change notification settings - Fork 15
[2주차] 추상 데이터 타입, 컬렉션 (백, 스택, 큐, 연결리스트) #10
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
Open
ndopy
wants to merge
12
commits into
CodeSoom:main
Choose a base branch
from
ndopy:week2-phd
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b75922f
solve: problem-1-1
ndopy 66bdd23
solve: problem-1-2
ndopy 8546515
solve: problem-2-1
ndopy 1f5e0e9
solve: problem-2-2
ndopy 3373ba6
solve: problem-3-1
ndopy 00d0a95
solve: problem-3-2
ndopy 3ecca82
refactor: Bag 을 연결 리스트로 구현하기
ndopy 0a89479
refactor: Stack 을 연결 리스트로 구현하기
ndopy 45eac7b
refactor: Queue 를 연결 리스트로 구현하기
ndopy d1936b3
docs: README 수정
ndopy 4d40e62
refactor: dequeue 메서드 수정
ndopy 5d4afc2
refactor: 리뷰 반영
ndopy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Node 객체를 선언할 때 item과 next를 private으로 선언하셨네요. 하지만 코드를 사용하는 곳을 보면 이렇게 사용하고 있습니다.
그래서 원래 의도와는 다르게 퍼블릭
item속성에 접근하고 있는 것 같습니다. 자바스크립트가 타입이 없다보니 이런 실수가 일어난 것 같네요.그리고 여기서 Node의 속성들은 private일 필요는 없습니다. 왜냐하면 단순한 자료 구조를 나타내는 객체라서 캡슐화가 필요 없기 때문이에요.
Stack은 외부에서first속성을 건드리면 안되기 떄문에 접근하지 못하도록 private으로 선언했지만, Node는 그렇지 않습니다.