-
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
[장희직] - 민겸 수, 이모티콘 할인 행사 #209
Conversation
} | ||
} | ||
|
||
private fun String.getMaxDecimal(): String { |
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.
확장함수 오랜만에 보네요,,,
discounts.add(discountRate) | ||
findDiscounts(discounts = discounts, counts = counts) | ||
discounts.removeLast() |
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.
이렇게 해주면 매번 배열을 새로 만들지 않아도 되는군요!
} | ||
} | ||
|
||
private fun String.getMaxDecimal(): String { |
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.
확장함수가 예쁘네용
|
||
private fun findDiscounts(discounts: MutableList<Int>, counts: Int) { | ||
if (discounts.size == counts) { | ||
getResult(discounts).run { |
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.
여기서 결과를 계산해서 discounts를 복사할 필요가 없었군요!
📌 from issue #206 📌
📋문제 목록📋
📍추가로 해결한 문제📍