NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

(This question is a variation of the LeetCode question 334. Increasing Triplet Subsequence. If you haven't completed that question yet, it is recommended to solve it first.)

Given an integer array nums, count the number of triplets (i, j, k) such that i < j < k, and nums[i] > nums[j] > nums[k]. Return the total count of such triplets.

Test Cases
Input
Output
Expected