Problem Explanation
- In this challenge we need to get the largest product of
n
cosnecutive numbers.
- We can use the sliding window method to solve this problem.
- Steps to follow:
- Select the first n consecutive numbers.
- Find their product.
- Compare it to the maximum product yet.
- Move the pointer by 1 element.
- Repeat the process.
- This algorithm’s big O is O(n*m) where n is the length of the array and m is the number of consecutive elements.
Solutions
Solutions are not provided for Project Euler challenges.
1 Like