Experience
Each box has a left cookie, a nested center box, and a right cookie. The center is to hold the smallest weights, the left medium weights, and the right largest weights. Return a bracket representation such as [left [center] right] and the target’s level, with the outermost box defined as level 1. Example: N=5, weights [76, 62, 99, 21, 39], target=99 gives [76[62[21]39]99] and a stated level of 3, although 99 appears in the outermost box; the example conflicts with the level definition.