This article will walk you through how to solve another classic DP problem: Longest Increasing Subsequence (LIS). To make it a bit more fun, we are going to pick another problem from the UVA¹ database: Strategic Defence Initiative². Read that problem first before continuing this article.

In short, the problem states that there are some enemy missiles heading your way and you are equiped with a missile system to intercept them. For every missile you launch, the next one can only be launched at a higher altitude than the previous one (because of a flaw in your missile system). …

Tiago

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store