Prune a Multiway Tree to a Maximum Depth

Quick Overview

Given a rooted multiway tree as a parent array, return the minimum explicit subtree deletions needed to keep every remaining node within a maximum depth while preserving the root.

Prune a Multiway Tree to a Maximum Depth

Company: Snowflake

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Overview: Given a rooted multiway tree as a parent array, return the minimum explicit subtree deletions needed to keep every remaining node within a maximum depth while preserving the root.

|Home/Coding & Algorithms/Snowflake
Snowflake logo
Snowflake
Aug 15, 2026
mediumSoftware EngineerTechnical ScreenCoding & Algorithms
18
0
Loading...

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...