GOLANG_INTERVIEW Telegram 379
💡 Задача: Отрезки пересечения отрезков

Условие: дается два массива, каждый элемент в котором представлен отрезком, значения которого соответствуют соответственно началу и концу.

Необходимо вывести результирующий массив, внутри которого будут представлены отрезки пересечения двух исходных массивов.

Пример:

Ввод:
firstList = [[0,2],[5,10],[13,23],[24,25]], secondList = [[1,5],[8,12],[15,24],[25,26]]
Вывод: [[1,2],[5,5],[8,10],[15,23],[24,24],[25,25]]

Ввод: firstList = [[1,3],[5,9]], secondList = []
Вывод: [ ]

Решение

Пишите свое решение в комментариях👇

@golang_interview
Please open Telegram to view this post
VIEW IN TELEGRAM
👍12🔥31🌚1



tgoop.com/golang_interview/379
Create:
Last Update:

💡 Задача: Отрезки пересечения отрезков

Условие: дается два массива, каждый элемент в котором представлен отрезком, значения которого соответствуют соответственно началу и концу.

Необходимо вывести результирующий массив, внутри которого будут представлены отрезки пересечения двух исходных массивов.

Пример:

Ввод:
firstList = [[0,2],[5,10],[13,23],[24,25]], secondList = [[1,5],[8,12],[15,24],[25,26]]
Вывод: [[1,2],[5,5],[8,10],[15,23],[24,24],[25,25]]

Ввод: firstList = [[1,3],[5,9]], secondList = []
Вывод: [ ]

Решение

Пишите свое решение в комментариях👇

@golang_interview

BY Golang вопросы собеседований




Share with your friend now:
tgoop.com/golang_interview/379

View MORE
Open in Telegram


Telegram News

Date: |

The SUCK Channel on Telegram, with a message saying some content has been removed by the police. Photo: Telegram screenshot. To edit your name or bio, click the Menu icon and select “Manage Channel.” There have been several contributions to the group with members posting voice notes of screaming, yelling, groaning, and wailing in different rhythms and pitches. Calling out the “degenerate” community or the crypto obsessives that engage in high-risk trading, Co-founder of NFT renting protocol Rentable World emiliano.eth shared this group on his Twitter. He wrote: “hey degen, are you stressed? Just let it out all out. Voice only tg channel for screaming”. You can invite up to 200 people from your contacts to join your channel as the next step. Select the users you want to add and click “Invite.” You can skip this step altogether. Private channels are only accessible to subscribers and don’t appear in public searches. To join a private channel, you need to receive a link from the owner (administrator). A private channel is an excellent solution for companies and teams. You can also use this type of channel to write down personal notes, reflections, etc. By the way, you can make your private channel public at any moment.
from us


Telegram Golang вопросы собеседований
FROM American