Track both minimum and maximum [mp]
Micro pattern¶
Description¶
Maintain both extremes when a later operation can reverse their roles.
Problems¶
- 152. Maximum Product Subarray (Top Hard)
Maintain both extremes when a later operation can reverse their roles.