Sasken | OA | 31st may 2026 | Planting Trees
Question · Posted Apr 2026
Problem Statement: Planting Trees The Scenario: In a field, trees are planted in a single row from left to right. Each tree has an associated value V. You perform a series of "cut and plant" operations. The Operation Rules: Cutting: You always cut the tree currently at the leftmost end of the row. Planting: For each tree of value V that you cut: Calculate the number of new trees to plant: N=(V+1)(modM). Plant these N trees at the rightmost end ...
The full answer & interview discussion are available to premium members.
Log in Create a free account