Company: HSBC oncampus_5april
Difficulty: medium
A mouse is digging in the roots of a plant in search of food. The plant root nodes are represented by integers, and the mouse digs through the roots in a Breadth-First Search (BFS) manner. However, if the mouse encounters a node with a prime number, it skips that node and continues its search. You need to return a list of nodes where the mouse finds the food. A plant node is represented as class TreeNode { int val; TreeNode left; TreeNode right; TreeNode(int x) { val = x; left = null; right = null; } } Input Format The first line of input takes 'N': Number of nodes in the binary tree The second line of input contains an integer array (space-separated) plantFoodNodes: represents the tree nodes. Each node of a tree represents a node with an integer value with the non-prime values(composite) denoting the node contains food. Output Format A list of nodes (space-separated) visited by the mouse in BFS order, skipping the nodes that are prime numbers. If a mouse is unable to find the food, re