Available question text
Count the number of index triplets i<j<k in an array of unique ratings such that the ratings form a strictly increasing or strictly decreasing sequence. With n up to 1000, this is essentially counting length-3 monotonic subsequences (feasible with O(n^2) approaches).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1395. Count Number of Teams
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source