Language C++: Kill Monger Suppose you are playing a killing game and have to kill few of your enemies. You are at a cliff and from there you can see few of them. You see the enemies at your height only. Therefore, you can only kill at the same height. The enemies are forming a balanced binary tree where their General is at the top of the other cliff, his two commanders are on the first level below him. The soldiers are at the lowest level. Total four soldiers are appointed. Under both the commanders exact two soldiers serve. You have to make a strategy to kill the left commander first, than whoever takes his position kill him. Now start killing the right side with same strategy until only one enemy is left at left side. Now increase your height and kill the General. You can only win if only three of your enemies are left. Display the enemies who are left and who have been killed. Don’t forget to print your victory message. HINT: Balancing is the key to achieve your goal.
Language C++:
Kill Monger
Suppose you are playing a killing game and have to kill few of your enemies. You are at a
cliff and from there you can see few of them. You see the enemies at your height only.
Therefore, you can only kill at the same height. The enemies are forming a balanced binary
tree where their General is at the top of the other cliff, his two commanders are on the first
level below him. The soldiers are at the lowest level. Total four soldiers are appointed. Under
both the commanders exact two soldiers serve.
You have to make a strategy to kill the left commander first, than whoever takes his position
kill him. Now start killing the right side with same strategy until only one enemy is left at left
side. Now increase your height and kill the General. You can only win if only three of your
enemies are left.
Display the enemies who are left and who have been killed. Don’t forget to print your victory
message.
HINT: Balancing is the key to achieve your goal.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)