GOLANG_INTERVIEW Telegram 425
💡Задача: То же дерево

Условие:
Получив корни двух бинарных деревьев p и q, напишите функцию, проверяющую, совпадают ли они.

Два бинарных дерева считаются одинаковыми, если они структурно идентичны, а узлы имеют одинаковое значение.

Примеры (картинки по порядку):
Ввод: p = [1,2,3], q = [1,2,3]
Вывод: true

Ввод: p = [1,2], q = [1,null,2]
Вывод: false

Ввод: p = [1,2,1], q = [1,1,2]
Вывод: false

Ограничения:
Количество узлов в обоих деревьях находится в диапазоне [0, 100].

📌 Решение

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

@golang_interview
4👍1🔥1



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

💡Задача: То же дерево

Условие:
Получив корни двух бинарных деревьев p и q, напишите функцию, проверяющую, совпадают ли они.

Два бинарных дерева считаются одинаковыми, если они структурно идентичны, а узлы имеют одинаковое значение.

Примеры (картинки по порядку):
Ввод: p = [1,2,3], q = [1,2,3]
Вывод: true

Ввод: p = [1,2], q = [1,null,2]
Вывод: false

Ввод: p = [1,2,1], q = [1,1,2]
Вывод: false

Ограничения:
Количество узлов в обоих деревьях находится в диапазоне [0, 100].

📌 Решение

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

@golang_interview

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






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

View MORE
Open in Telegram


Telegram News

Date: |

Judge Hui described Ng as inciting others to “commit a massacre” with three posts teaching people to make “toxic chlorine gas bombs,” target police stations, police quarters and the city’s metro stations. This offence was “rather serious,” the court said. 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. During a meeting with the president of the Supreme Electoral Court (TSE) on June 6, Telegram's Vice President Ilya Perekopsky announced the initiatives. According to the executive, Brazil is the first country in the world where Telegram is introducing the features, which could be expanded to other countries facing threats to democracy through the dissemination of false content. 6How to manage your Telegram channel? But a Telegram statement also said: "Any requests related to political censorship or limiting human rights such as the rights to free speech or assembly are not and will not be considered."
from us


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