I would like to continue my journey about CSS Layout. In my previous, I have introduced flexbox, it is one-dimention layout, you either layout items in column direction or row direction. please refer to Flexbox.
This post is regarding to solve the LeetCode problem: Subarray Sum Equals K.
This article is my own summary about Dynamic Programming algorithm. The first time I heard bout this term is from What is Dynamic Programming and Hot wo use it by YK Sugishita. He started with Fibonacci squence. We all know to resolve it by using recursion.
const fibRecursive = function(n){
if (n <= 2) return 1;
return (fibRecursive(n-1) + fibRecursive(n-2));
}
In general, elements on webpage lay themselves out according to normal flow (the default setting of each element tag).
example:
All the elements in the HTML are displayed as boxes with default properties associated with them. This is what we referred to Box Model in CSS.