Skip to content

Latest commit

 

History

History
18 lines (10 loc) · 510 Bytes

File metadata and controls

18 lines (10 loc) · 510 Bytes

Find Adjacent Elements Product

CodeSignal

Question Description. Link

Given an array of integers, find the pair of adjacent elements that has the largest product and return that product.

Example

  • For inputArray = [3, 6, -2, -5, 7, 3], the output should be adjacentElementsProduct(inputArray) = 21
    • 7 and 3 produce the largest product.

Solutions