Русский
Открыть в Telegram

Пост #4032 | Longest Subarray With at Most K Distinct Prime Factors

4 сентября 2026
P
Problem Solving with Arman (ML+Algo)
Ссылка
нажмите — покажем
#4032 | Longest Subarray With at Most K Distinct Prime Factors Topics: prime factorization, 2 pointers Problem Statement: You are given an integer array numsconsisting of positive integers and an integer k. The prime factor set of a subarray is the union of the distinct prime factors of all its elements. Return the length of the longest subarray whose prime factor set contains at most k distinct prime factors. If no such subarray exists, return 0. Input: nums = [7,6,10,12,11], k = 3 Output: 3 Explanation: longest subarray -> [6, 10, 12] * 6: {2, 3} * 10: {2, 5} * 12: {2, 3} Union set of prime factors: {2, 3, 5} and number of sets is at most K. 🔗 Link: https://leetcode.com/problems/longest-subarray-with-at-most-k-distinct-prime-factors/ #POTD #LeetCode
1 · 56 ·

Рядом в ленте

PProblem Solving with Arman (ML+Algo)🔐 Ваш продукт может пройти автоматическую проверку безопасности – и все равно остаться уязвимым. Одна незамеченная ошибка может привести к утечке данных, доступPProblem Solving with Arman (ML+Algo)🚀 CPFED Kaspi.kz DIV-2 контестіне тапсырма авторларын іздейміз! Жаңа рейтингілік CPFED Kaspi.kz DIV-2 раундына қызықты, ерекше әрі алуан түрлі алгоритмдік тапсы
это сообщение
PProblem Solving with Arman (ML+Algo)«Ой да көп, уайым да көп – ойлай берсең, Ой да жоқ, уайым да жоқ – ойнай берсең». © Мұхтар ӘуезовPProblem Solving with Arman (ML+Algo)Mo's algorithm is an efficient offline query-processing technique based on Square Root (sqrt) Decomposition. It is designed to answer multiple range queries [L,
PProblem Solving with Arman (ML+Algo)Problem Solving with Arman (ML+Algo)@armancpp · канал · Технологии
106подписчиков28средний охват поста
Лента площадки Открыть в Telegram

Открытая публичная лента из поискового индекса ChatCrawler — «Google по публичному Telegram»; обновляется по мере обхода площадки. Время — UTC.

Только публичный контент, официальный API Telegram. О проекте · Вопросы · Границы индекса · Убрать страницу из выдачи · Каталог · Поиск · Как мы считаем