Dynamic programming is very common in competitive programming. There are various types, and there is no elixir. The best way is to practice more.