Algorithms
Algorithms copied to clipboard
SSOC'23 To check whether a given binary tree is balanced or not in Java,C,C++
@Kumar-laxmi As a part of SSOC'23 please assign me this problem I will explain the code clearly with comments. Approach : Recursion Time Complexity : O(N) Space Complexity : O(N) [ Auxiliary Stack is used here]
@Kumar-laxmi As apart of SSOC'23 pls assign me this problem I will explain the code with comments Approach 1 Inorder traversal is sorted then binary tree is balanced. Approach 2 check if maximum value in left subtree < root node minimum value in right subtree >node i will prefer Approach 2 to solve this
Stale issue message