SKILL TREE

Description

Joker, Penguin , Poison Ivy, Mr Freeze and their allies have taken over Gotham City

Batman, our superhero has no superpowers.

He relies on his genius intellect, physical prowess, martial arts abilities, detective skills, science and technology, vast wealth, intimidation, and indomitable will to defeat his enemies.

At times this is not enough and whenever the going gets tough he has always had his allies by his side. Alfred Pennyworth, Superman, Dick Grayson, Wonder Woman , Commissioner Gordon to name a few.

This is your chance.Your opportunity to fight by his side and help batman save the day.

Your challenge if you choose to accept it is to help batman find the best skill that he should acquire to defeat his (our) enemies with minimum energy (points)

Requirements

Constraint

Input

The HTTP POST request will come with a body of Content-Type: application/json

{
  "boss":
    {
      "name": "joker",
      "offense": 11
    }
  ,
  "skills": [
    {
      "name": "Grapple Gun",
      "offense": 5,
      "points": 1,
      "require": null
    },
    {
      "name": "Hacking Device",
      "offense": 6,
      "points": 2,
      "require": "Grapple Gun"
    },
    {
      "name": "Remote",
      "offense": 7,
      "points": 3,
      "require": "Hacking Device"
    },
    {
      "name": "Bomb",
      "offense": 20,
      "points": 5,
      "require": "Remote"
    },
    {
      "name": "Inverted takedown",
      "offense": 5,
      "points": 1,
      "require": null
    },
    {
      "name": "Shockwave attack",
      "offense": 8,
      "points": 3,
      "require": "Inverted takedown"
    }
  ]
}

Output

["Grapple Gun", "Hacking Device"]