GOLANG_INTERVIEW Telegram 254
Изменение порядка следования элементов связного списка

Сложность: Средняя

Условие задачи : дан связный список:
L0 → L1 → … → Ln - 1 → Ln.

Надо переопределить порядок следования элементов на следующий:
L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …

Пример:

Ввод: head = [1,2,3,4]
Вывод: [1,4,2,3]

Ввод: [1,2,3,4,5]
Вывод: [1,5,2,4,3]

Решение задачи

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

@golang_interview
🔥4👍31



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

Изменение порядка следования элементов связного списка

Сложность: Средняя

Условие задачи : дан связный список:
L0 → L1 → … → Ln - 1 → Ln.

Надо переопределить порядок следования элементов на следующий:
L0 → Ln → L1 → Ln - 1 → L2 → Ln - 2 → …

Пример:

Ввод: head = [1,2,3,4]
Вывод: [1,4,2,3]

Ввод: [1,2,3,4,5]
Вывод: [1,5,2,4,3]

Решение задачи

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

@golang_interview

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




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

View MORE
Open in Telegram


Telegram News

Date: |

The group’s featured image is of a Pepe frog yelling, often referred to as the “REEEEEEE” meme. Pepe the Frog was created back in 2005 by Matt Furie and has since become an internet symbol for meme culture and “degen” culture. In handing down the sentence yesterday, deputy judge Peter Hui Shiu-keung of the district court said that even if Ng did not post the messages, he cannot shirk responsibility as the owner and administrator of such a big group for allowing these messages that incite illegal behaviors to exist. With the “Bear Market Screaming Therapy Group,” we’ve now transcended language. Polls Telegram offers a powerful toolset that allows businesses to create and manage channels, groups, and bots to broadcast messages, engage in conversations, and offer reliable customer support via bots.
from us


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