Given the root of a binary tree and a target value, return the level of the node holding that value, where the root is at level 1. Return -1 if the value is not present. The input gives a level-order tree array and the target separated by ' | '.
Input: A level-order tree array and the target, separated by ' | '.
Output: Integer — the 1-indexed level, or -1.
Input: [1,2,3,4,5,null,7] | 5
Output: 3
Explanation: 5 sits on the third level.Input: [1,2,3] | 3
Output: 2
Explanation: 3 is a child of the root.Input: [1,2,3] | 9
Output: -1
Explanation: 9 is absent.0<=nodes<=10^4-1000<=value<=1000