Загрузка...

Median of BST| DSA Coding

You are given the root of a Binary Search Tree, find the median of it.

Let the nodes of the BST, when written in ascending order (inorder traversal), be represented as V1, V2, V3, …, Vn, where n is the total number of nodes in the BST.

If number of nodes are even: return V(n/2)
If number of nodes are odd: return V((n+1)/2)

LIKE the video, COMMENT if you have any questions and SHARE it with your loved once's. SeaU

Get the source: https://www.geeksforgeeks.org/problems/median-of-bst/1

#dsa #algorithm #interview #interviewexperiences #coding #codingforbeginners #codingtutorial #binarysearchtree #tree

Видео Median of BST| DSA Coding канала OBrutus
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять