Skip to content

[Lustellz] WEEK 02 problems #1756

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

Merged
merged 8 commits into from
Aug 3, 2025
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
9 changes: 9 additions & 0 deletions climbing-stairs/Lustellz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// week2 goal
// not knowing how to express, I googled and referenced a bit
function climbStairs(n: number): number {
let stairArray: number[] = [1,2]
Copy link
Contributor

Choose a reason for hiding this comment

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

const로 변경하는 것과 타입 명시를 생략하고 추론하는 것 둘다 가능해 보이는데 어떻게 생각하세요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그러네요! 좋은 의견 감사합니다.

for(let i = 2;i<n; i++){
stairArray.push(stairArray[i-1]+stairArray[i-2])
}
return stairArray[n-1]
};
1 change: 1 addition & 0 deletions top-k-frequent-elements/Lustellz.ts
Copy link
Contributor

@yhkee0404 yhkee0404 Aug 5, 2025

Choose a reason for hiding this comment

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

@SamTheKorean 이 파일처럼 비었지만 Merge 된 경우가 더 있네요: #1733 (review)

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// frequency is k times
14 changes: 14 additions & 0 deletions valid-anagram/Lustellz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// week 2's goal
// only focusing on not using for... not a good approach :(

function isAnagram(s: string, t: string): boolean {
if(s.length !== t.length) return false
let sArray : string[] = s.split('').sort()
s = sArray.join('')
let tArray : string[] = t.split('').sort()
t = tArray.join('')
if(s === t) return true
else return false
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

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

이렇게 줄여볼 수도 있겠어요:

Suggested change
if(s === t) return true
else return false
return s === t

Copy link
Contributor Author

Choose a reason for hiding this comment

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

오! 그렇게 축약하는 건 생각 못했어요.
의견 감사합니다!

};

// reflection: not to be hurry & have more time for pondering