Path In The Tree
CodeChefOpen on judge ↗
Problem description. You are given a string (named str) of length l (consisting of lowercase english alphabets (roman)), and a tree with n number of nodes. Each node of the tree has a character(again lowercase english alphabet) written on it. The tree is ROOTED AT 1. If on the tree, we find a path, such that it is vertical (runs from top to bottom), and starting from the node nearer to the root (
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start