3392. Count Subarrays of Length Three With a Condition
UMPIRE - [U]nderstand the problem, ask questions and come up with corner test cases. - [M]atch the leetcode pattern - [P]lan to using pattern template and data structures - [I]mplement the code - [R]eview by running the example and corner test cases - [E]valuate time and space complexity Understand Return number of length 3 sub arrays whose nums[1]/2 == nums[0] + nums[2] Brute force We can generate all sub arrays of length 3 O(n^2)....