Hoisting in JavaScript is something that confuses a lot of people and asked often in the interviews but it is taught as a misconception that all variable declarations are moved to the top etc etc…
Complexity in Programming Algorithms
Complexity Analysis is an important topic which you must need to know to understand Data Structures and to compare two or more algorithms. I have tried to explain the Time-Space Complexities of Algorithm in this post.