Company: grow_25sep
Difficulty: medium
Trees: Max Binary Path Problem Description There are N cities and (N-1) roads linking them, together forming a tree. Every city carries a binary value of 0 or 1. A traveler sets off from some starting city and may move to any city they haven't yet visited, provided a direct road connects it to their current location. The trip is over once the traveler reaches a chosen ending city. Along the way, from start to finish, the traveler jots down the value (0 or 1) of every city visited, in order. At the finish, the trip's value is defined as the decimal number represented by that recorded binary string. Work out the binary representation of the largest trip value achievable this way. Note: If several different trips share the same maximum value, print the binary string belonging to the longest one among them. Function Description Using the variables given in the provided code snippet, fill in the findMax(...) method so that it prints, in binary, the largest tour value reachable this way. Add