Logo
TGCATALOG
Catalog Collections Blog
C# LeetCode - tasks

C# LeetCode - tasks

LeetCode C#.

No ratings
622
31.10.2026
622
31.10.2026
No ratings
622
31.10.2026
Safe redirect via bot
О канале

LeetCode C#.

Подписчиков 3,158
Тематика Technology
Язык English
Ссылка t.me/easy_c_sharp_task

We also recommend

Kekaton AI | Voiceover and voice clone
Kekaton AI | Voiceover and voice clone
Bot

AI bot for text-to-speech and voice cloning in Telegram. Create audio using neural network quickly and easily.

Description

LeetCode tasks in C#.

Latest posts

C# LeetCode - tasks
C# LeetCode - tasks
🔒Открыть пост
и посмотреть медиа
Задача: 976. Largest Perimeter Triangle Сложность: easy Дан целочисленный массив nums. Верните наибольший периметр треугольника с ненулевой площадью, образованный из трех этих длин. Если невозможно образовать треугольник с ненулевой площадью, верните 0. Пример: Input: nums = [1,2,1,10] Output: 0 Explanation: You cannot use the side lengths 1, 1, and 2 to form a triangle. You cannot use the side lengths 1, 1, and 10 to form a triangle. You cannot use the side lengths 1, 2, and 10 to form a triangle. As we cannot use any three side lengths to form a triangle of non-zero area, we return 0. 👨💻 Алгоритм: 1⃣Отсортируйте массив nums в порядке возрастания. 2⃣Для каждого элемента c в массиве, начиная с конца: Выберите два наибольших возможных значения a и b, которые находятся перед c в отсортированном массиве (т.е. значения, смежные с c). Проверьте, образуют ли a, b и c треугольник (условие треугольника: a + b > c). Если образуют, верните их сумму как периметр треугольника. 3⃣Если не удалось найти такие значения, верните 0. 😎 Решение: public class Solution { public int LargestPerimeter(int[] A) { Array.Sort(A); for (int i = A.Length - 3; i >= 0; --i) if (A[i] + A[i + 1] > A[i + 2]) return A[i] + A[i + 1] + A[i + 2]; return 0; } } Ставь 👍 и забирай 📚 Базу знаний
C# LeetCode - tasks
FAQ

Open C# LeetCode - tasks in Telegram and press the Start button. No separate registration is required.

Yes. The service is designed to be straightforward: open the resource, follow the on-screen instructions and start using it.

No. You can use C# LeetCode - tasks directly in Telegram unless the resource description says otherwise.

Access depends on the resource. Check the current information in Telegram after opening C# LeetCode - tasks.

The exact features depend on the resource. Open C# LeetCode - tasks to see its current functions, content and access conditions.
Subscriber dynamics
+-1.0% last 30 days
Current
3,158
Month ago
3,190
Average growth
+-1 / day
Updated
5 hours ago

Reviews for channel C# LeetCode - tasks

Log in to leave a review

Only registered users can share their opinion.

No reviews yet

Be the first to share your impression of this resource!

Similar resources

Loading
Switch to Light Theme
Home Catalog Collections Blog Login