<commit_before>package easy;

import classes.TreeNode;

/**100. Same Tree

    Total Accepted: 145623
    Total Submissions: 330537
    Difficulty: Easy

Given two binary trees, write a function to check if they are equal or not.

Two binary trees are considered equal if they are structurally identical and the nodes have the same value. */
public class SameTree {
	//recursion idea flows out naturally.
	public boolean isSameTree(TreeNode p, TreeNode q) {
		if(p == null || q == null) return p == q;
		if(p.val != q.val) return false;
		return isSameTree(p.left, q.left) && isSameTree(p.right, q.right);
	}
}<commit_msg>reduce three lines to two lines<commit_after>package easy;

import classes.TreeNode;

/**100. Same Tree

    Total Accepted: 145623
    Total Submissions: 330537
    Difficulty: Easy

Given two binary trees, write a function to check if they are equal or not.

Two binary trees are considered equal if they are structurally identical and the nodes have the same value. */
public class SameTree {
	//recursion idea flows out naturally.
	public boolean isSameTree(TreeNode p, TreeNode q) {
		if(p == null || q == null) return p == q;
		return p.val == q.val && isSameTree(p.left, q.left) && isSameTree(p.right, q.right);
	}
}
{'fraction_non_alphanumeric': 0.09397590361445783, 'fraction_numerical': 0.024096385542168676, 'mean_word_length': 3.7739463601532566, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6582934', 'n_tokens_mistral': 416, 'n_tokens_neox': 377, 'n_words': 159}