This category contains an illustrative Dynamic programming problem based on counting. We apply a bottom-up approach to solve the question. First, we calculate the smaller problems of a question. We reach the main problem Using solutions of smaller subproblems.
Number of Ways to Convert 2 into N by Squaring, Adding 1, or Multiplying with 2
By GAZAL ARORA
● Published At Mar 2022
In this article, we will design an algorithm for counting the number of ways to convert 2 into a given number N by squaring, adding 1, or multiplying with 2.... Keep reading ..
Number of ways of Triangulation
By Arun Nawani
● Published At Oct 2021
In this problem, we’ll learn about the Catalan series and how to find the total number of ways a polygon can be triangulated. ... Keep reading ..
Count of non-decreasing Arrays arr3 such that arr1[i] <= arr3[i] <= arr2[i]
By Vibhor Bhatnagar
● Published At Dec 2021
This article will discuss the problem count of non-decreasing arrays arr3 such that arr1[i] <= arr3[i] <= arr2[i]... Keep reading ..
Count of sequence of length K in the range [1, N] where every element is a multiple of its previous one
By Ayush Prakash
● Published At Feb 2022
In this blog, we are going to discuss an interesting problem: Count of sequence of length K in the range [1, N] where every element is a multiple of its previous one. We are also going to discuss the space and time complexity of the approaches discus... Keep reading ..
Count subsequences with GCD equal to X
By Aman kumar Chourasiya
● Published At Jan 2022
In this blog, we will discuss a problem based on dynamic programming. Dynamic programming is a well known topic asked in programming contests and coding interviews.... Keep reading ..