Running State Pattern — LeetCode #1480: Running Sum of 1D Array
Prerequisite: Loop Invariants — the first post in this series covers what an invariant is and how to state one. If the word "invariant" is new to you, start there.
The Problem (15 seconds)
Given an array nums, return an array where each element is t...
patternthinking.hashnode.dev5 min read