← Samsung questions

Sum of nodes at level K in binary tree with custom string format

Filed under Samsung

Parse a custom string representation of a binary tree (e.g., '(P(C1)(C2))') and calculate the sum of node values at a specific depth K.

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 Samsung questions

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