Maximum Value of an Ordered Triplet II at Media.net

Medium56.4% acceptance

This problem has 87.5% frequency at Media.net.

Problem Description

You are given a **0-indexed** integer array `nums`. Return _**the maximum value over all triplets of indices**_ `(i, j, k)` _such that_ `i < j < k` _._ If all such triplets have a negative value, return `0`. The **value of a triplet of indices** `(i, j, k)` is equal to `(nums[i] - nums[j]) * nums[...

Read full problem and hints

Topics

Also asked at 4 companies


More Media.net Questions

View all Media.net questions