Problem Statement:
Ella is exploring a magical forest filled with glowing stones arranged in a line. These stones are numbered from 1 to N, with the first stone at position 1 and the last at position N. Ella starts outside the forest, just before the first stone. She can step forward to either the next stone or skip a stone to land two stones ahead. However, some stones are cursed and cannot be stepped on. If Ella steps on a cursed stone, she will be teleported back to the start.
Your task is to help Ella find and return an integer value representing the number of ways she can safely reach the $N^{th}$ stone without stepping on any cursed stones. If there is no possible way to reach the last stone, return 0.
Note:
The answer may be large, so return the answer modulo 10^9 + 7.
The array follows 1-based indexing.
Input Specification:
input1: An integer value N, representing the total number of stones.
(Additional inputs for cursed stones would follow).
Problem Statement:
Evan is planning to collect some fruits from a garden. The garden is described in a M \times N matrix, where every element of the matrix represents the number of fruits in that cell.
Evan is initially in the X^{th} row and Y^{th} column and can only take K steps to collect the fruits. In every step, he can move to any one of the four adjacent cells and can collect the fruit present in that cell.
Your task is to find and return an integer value representing the maximum number of fruits that Evan can collect in K steps.
Note:
Input Specification:
Problem Statement:
As a project manager, Emily is overseeing the launch of several marketing campaigns. She has X different campaign ideas and can combine these ideas to create a powerful new marketing strategy. She can use at most Y ideas in any combination to craft a new marketing approach.
Your task is to help Emily determine how many different marketing combinations she can craft from the existing campaign ideas and return an integer representing the total number of possible strategies, including the original ideas.
Note:
Input Specification: