Yesterday, he flew into a shelf next to my bed on his own, without any prompting for the first time. There wasn't even a phone on the shelf! Momo just seems to have a subconscious curiosity for thing…
If I want to get the sum of a range [0-n], where n starts at 1 and increments up to n as the max number in the array, just memorize this equation. This is an O(1) solution, which is ideal.
sum =…