Given an integer array arr, return the length of the longest subarray, which is a mountain. Return 0 if there is no mountain subarray.
You are given an array of integers arr. A mountain is a subarray that has at least 3 elements. Strictly increases until a peak (not at the ends). Strictly decreases after the peak. Return the length ...
🚀 Day 15 of DSA 100 Peak Index in a Mountain Array (Binary Search Approach) Today’s problem is “Peak Index in a Mountain Array” (LeetCode 852). The goal is to find the index of the peak element in a ...
🚀 DSA Series – Day 12 📌 Problem: Minimum Size Subarray Sum (LeetCode 209) Today’s problem is a classic Sliding Window pattern — super important for interviews. 🧠 Problem Summary Given an array of ...