Похожие чаты

Hello guys i need a solution about an algorithm we have a

sequense like these: 1 2 2 3 3 3 2
let's call them balloons :)
at the beginning of every day,all balloons with the same color(number) and with a count of bigger than 3 are blowed. for example in day 1, all balloons with name "3" is gonna blow and at the end of the day the remaining array is gonna shift like this: 1 2 2 2
and again in another morning all sub arrays with the common subarray bigger than 3 (compared by size) are blowed.
the output of the algorithm is an array with the same size of the input array that shows the day number of blowing of each ballon.
for example ==>

input: 1 2 2 3 3 3 2
output: -1 2 2 1 1 1 2

it shoes that ballon number 1 is never gonna blow because it's just 1 and never be bigger than 3. and it shoes that all balloons that their name was 3 are blowed at the first day. and then the 2 at the end of the array is shifted and all 2 2 2 are blowed at the second thay.

what do you do for implementing this algorithm?

1 ответов

20 просмотров
Peyman-EhsanDoost Автор вопроса

please help it's important to me guys thank you all❤️

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта