Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doitchuu/NumberOf1Bits.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

n & (n - 1) 비트 트릭을 활용해서 효율적으로 잘 구현하신 것 같아요, 근데 n >>> 0 은 어떤 의미인지 궁금합니다!

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 재업로드
/**
* @param {number} n - a positive integer
* @return {number}
Expand Down
1 change: 1 addition & 0 deletions doitchuu/SameTree.js
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

저랑 풀이가 같은 것 같습니다! 둘 다 null인지, 하나만 null인지, 값이 같은지를 먼저 확인한 뒤 왼쪽/오른쪽 서브트리를 비교하는 흐름이 명확해서 읽기 좋았어요~

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 재업로드
/**
* Definition for a binary tree node.
* function TreeNode(val, left, right) {
Expand Down
Loading