(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.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected