-
Notifications
You must be signed in to change notification settings - Fork 3
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
resolve #134-common-child 문제풀이 및 문서추가 #136
base: master
Are you sure you want to change the base?
Conversation
|
||
return acc; | ||
}, []); | ||
row.push(0); |
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.
let row = s1.reduce(acc => {
acc.push(0);
return acc;
}, []);
row.push(0);
이 코드의 의도가 뭔지 궁금합니다.
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.
s1 사이즈를 사용해 배열을 사전에 초기ㅗㅘ하려는거 입니다
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.
배열을 초기화 하는 코드는 Array.from, 과 Array.fill 을 사용하는 편이 좋을것 같습니다.
*/ | ||
|
||
const lca = (string1, string2) => { | ||
const s1 = (string1.length <= string2.length) ? [...string1] : [...string2]; |
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.
string1 이 s1 이 될지, string2 가 s1 이될지 불분명해 보이는데. longer, shorter 와 같이 의미있는 이름을 쓰면 더 명확해질것 같습니다.
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.