Загрузка...

DAY 9 | LeetCode 441 – Arranging Coins | Java | Binary Search + Math Approach 🚀

In today’s Day 9 of LeetCode Challenge, we solve LeetCode 441 – Arranging Coins using Java.

You are given n coins and you need to build a staircase.
The 1st row has 1 coin, 2nd row has 2 coins, 3rd row has 3 coins, and so on.

Your task is to return the total number of complete rows you can form.

🔎 Example

Input: n = 8
Output: 3
Explanation:
1
2 3
4 5 6
7 8 (Incomplete row)

Видео DAY 9 | LeetCode 441 – Arranging Coins | Java | Binary Search + Math Approach 🚀 канала Simran Verma
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять