Efficiently detect shoot direction with gravity playing a role?

Hey, how could I efficiently calculate shoot direction for enemy AI in order for it to hit the player? Things I know: player position, player velocity, gravity, bullet spawn position, bullet initial velocity(gravity is also applied for it)


Link to Full Article: Efficiently detect shoot direction with gravity playing a role?