Edodovivmagarwal
Computer Science - Data Structures - Trees (binary trees) - Tree Code Challenges
Log in

Preparing your experience...

Loading scripts and resources

Comments (0)

0/5000

Comments are reviewed before appearing publicly.

About this Experience

Computer Science - Data Structures - Trees (binary trees) - Tree Code Challenges

vivmagarwal
vivmagarwalJan 29, 2026

Description

P1: 'TreeNode class' → class TreeNode: def __init__(self, val): self.val = val; self.___ = None; self.___ = None [left, right]. P2: 'Count all nodes' → def count(node): if node is ___: return 0; return 1 + count(node.left) + count(node.___) [None, right]. P3: 'Find tree height' → def height(node): i

Details

Computer ScienceData StructuresClass 11, AS Level, Class 11, Grade 11, DP Year 1

Engagement

20

Likes

0

Remixes

0

Comments