LeetCode 104. Maximum Depth of Binary Tree in F#
URL
https://leetcode.com/problems/maximum-depth-of-binary-tree/
Code
https://github.com/syohex/dotnet-study/blob/master/fsharp/leetcode/problems/0104/main.fsx
type Tree =
| Leaf
| TreeNode of int * Tree * Tree
let rec maxDepth (r: Tree) : in...
syohex.hashnode.dev1 min read