×
Home Discussions Write at Opengenus IQ
×
  • Join our Internship πŸŽ“
  • #7daysOfCode
  • C Interview questions
  • Linux πŸ’½
  • πŸ”Š Data Structures
  • Graph Algorithms
  • Dynamic Programming πŸ’‘
  • Greedy Algo πŸ“”
  • Algo Book 🧠
  • String Algo 🧬
  • Home

binary search tree

A collection of 5 posts

Algorithms

Sum of k smallest elements in Binary Search Tree

Given a binary search tree and a integer k our task is to find out sum of all the elements which is less or equal to the k th smallest element

Parth Maniyar Parth Maniyar
Algorithms

Find k-th smallest element in Binary Search Tree

Given root of the tree and k as input, output K th smallest element. We reduce the time complexity from O(N) to O(log N).

Parth Maniyar Parth Maniyar
Algorithms

Algorithm to convert Binary Search Tree into Balanced Binary Search Tree

In this article, we will explore an algorithm to convert a Binary Search Tree (BST) into a Balanced Binary Search Tree in linear time O(N).

Parth Maniyar Parth Maniyar
Algorithms

Algorithm for finding minimum or maximum element in Binary Search Tree【O(log V) / O(V)】

Binary Search Tree is a node-based binary tree data structure and finding the maximum or minimum element take O(log N) in average and can take O(N) in the worst case to O(1) in the best case.

Parth Maniyar Parth Maniyar
Data Structures

Understand everything about Binary Search Tree

Binary search tree is a data structure that quickly allows us to maintain a sorted list of numbers in a tree data structure. It can be used to search for the presence of a number in O(log(n)) time and a simple traversal gives the numbers in sorted order.

Vaibhav Gupta
×

Visit our discussion forum to ask any question and join our community

View Forum
OpenGenus IQ © 2021 All rights reserved β„’ [email: team@opengenus.org]
Top Posts LinkedIn Twitter