mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
feat: Add leetcode problem 441
This commit is contained in:
parent
3b653401f7
commit
10c8873433
@ -13,7 +13,7 @@ int arrangeCoins(int n)
|
||||
long long int guess = mid * (mid + 1L) / 2;
|
||||
long long int prevGuess = (mid - 1L) * mid / 2;
|
||||
if (guess == n)
|
||||
{ // Edge case - f it's equal then the last row is full and we have
|
||||
{ // Edge case - if it's equal then the last row is full and we have
|
||||
// reached our answer
|
||||
return mid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user