Welcome to the daily solving of our PROBLEM OF THE DAY with Siddharth Hazra. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Strings but also build up problem-solving skills.
In this problem, given a length n, count the number of strings of length n that can be made using a, b and c with at-most one b and two c allowed.
Example :
Input: n = 1
Output: 3
Explanation: Possible strings are: "a",
"b" and "c"
Give the problem a try before going through the video. All the best!!!
Problem Link: https://practice.geeksforgeeks.org/problems/count-of-strings-that-can-be-formed-using-a-b-and-c-under-given-constraints1135/1