<p>Given an array of positive integers <code>nums</code> and a positive integer <code>target</code>, return <em>the <strong>minimal length</strong> of a </em><spandata-keyword="subarray-nonempty"><em>subarray</em></span><em> whose sum is greater than or equal to</em><code>target</code>. If there is no such subarray, return <code>0</code> instead.</p>
<strong>Follow up:</strong> If you have figured out the <code>O(n)</code> solution, try coding another solution of which the time complexity is <code>O(n log(n))</code>.