Skip to content

Instantly share code, notes, and snippets.

View cixuuz's full-sized avatar
💭
Vibe Coding

cixuuuuuuuuz cixuuz

💭
Vibe Coding
View GitHub Profile
@cixuuz
cixuuz / 226_0730.py
Last active August 5, 2017 03:27
[226 Invert Binary Tree] #leetcode
# Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def invertTree(self, root):
"""
@cixuuz
cixuuz / 104_0730.java
Last active August 5, 2017 01:26
[104 Maximum Depth of Binary Tree] #leetcode
public class Solution {
public int maxDepth(TreeNode root) {
if (root == null) {
return 0;
}
return Math.max(maxDepth(root.left), maxDepth(root.right)) + 1;
}
}