1.Given a binary tree.
2.You have to check if it follows max heap property or not.
3.You have to complete the function isHeap() which should return true or false.
Input Format
Single Line contains a string representing the level order of the binary tree.
Output Format
Return true or false
Constraints
1 <= Number of nodes <= 100 1 <= Data of a node <= 1000
Notice
Try First, Check Solution later
1. You should first read the question and watch the question video.2. Think of a solution approach, then try and submit the question on editor tab.3. We strongly advise you to watch the solution video for prescribed approach.Example
Input
5 2 3
Output
true