0% found this document useful (0 votes)
35 views1 page

Depth of Complete Binary Tree

A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. The depth of a complete binary tree with n nodes is O(log n).

Uploaded by

Rashid Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views1 page

Depth of Complete Binary Tree

A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. The depth of a complete binary tree with n nodes is O(log n).

Uploaded by

Rashid Mahmood
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Depth of complete binary tree?

Name Best case Worst case


complexity complexity
Linear search o(1) O(n) T(n)=T(n-1)+c
Binary search O(1) Log(n) T(n)=T(n/2) + 1
Jump search O(1) O(n1/2)
Fibonacci search Log(n) F(n) = F(n-1) + F(n-2)
exponential search O(1) Log(n)
Bubble sort O(n) O(n2)
Insertion sort O(n) O(n2) N(N-1)/4
Selection sort O(n2) O(n2)
Marge sort N log (n) N log (n) T(n) = 2T(n/2) + n
Quick sort N log (n) N2 T(n) <= T(n/4) + T(3n/4) + cn
Heap sort N log (n) N log (n)
Shell sort O(N2)
DFS =O(V + E) BFS= O(V + E)
Dfs space complexity = O(V)
List of greedy algorithms

List of dynamic algorithms

List of minimum spanning tree algorithms

 Minimum Spanning Tree


 Kruskal's Algorithm
 PRIMS ALGORITHMPrim's Algorithm

List of shortest path algorithms

 Dijkstra's Algorithm
 Bellman-Ford Algorithm
 FLOYD WARSHAL

Asymptotic notations

Graph theory

Total no of comparisons in bubble sort ?

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy