← Flipkart questions

Maximum sum in tree with no adjacent nodes

Filed under Flipkart

Given a binary tree where each node contains an integer, find the maximum possible sum of a subset of nodes such that no two adjacent nodes (i.e., parent and child) are included.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Flipkart questions

Collected from public candidate posts and coding forums. Updated Nov 2026.