Advertisement

Insufficient Nodes in Root to Leaf Paths (Leetcode 1080)

Insufficient Nodes in Root to Leaf Paths (Leetcode 1080) Amazon, Microsoft, Google, Facebook, Netflix, Apple

Given the root of a binary tree, consider all root to leaf paths: paths from the root to any leaf. (A leaf is a node with no children.)

A node is insufficient if every such root to leaf path intersecting this node has sum strictly less than limit.

Delete all insufficient nodes simultaneously, and return the root of the resulting binary tree.

leetcode,leet code,leetcode solution,computer science,software,coding,interview,c#,array,linked list,java,tree,binary tree,trie,graph,shortest path,binarytree,data structures,programming interviews,

Post a Comment

0 Comments