Created
July 2, 2022 19:59
-
-
Save RakhmedovRS/3c97726e4aa77734d817947131b7696a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TreeNode { | |
/** Stores value in particular node */ | |
int val; | |
/** Pointer to the left child of current node */ | |
TreeNode left; | |
/** Pointer to the right child of current node */ | |
TreeNode right; | |
/** Different constructors */ | |
TreeNode() {} | |
TreeNode(int val) { this.val = val; } | |
TreeNode(int val, TreeNode left, TreeNode right) { | |
this.val = val; | |
this.left = left; | |
this.right = right; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment