This is a question which will confuse the beginners for a while. And in order to know this, you need to know the memory first, which is the memory architecture of your program in runtime. To keep it simple. Let’s firstly check the insanely simple C code below.
jQuery is great. Not only for its famous DOM manipulation but also for its extended functionalities, ajax is one of them. But when you use some libraries like React, you won’t need jQuery at all. But still you need to make an ajax call, how to deal with it?
There are tons of libraries which you can use. But just a special one you should pay attention, Fetch API, a living standard, and will someday be implemented by every modern browser. In fact, the latest version of most browsers have all supported this API. Including Chrome(Desktop/Android), Firefox, Opera and Edge. Let’s say how fancy it could be :) We’ll see it in a high abstract view first, then break into pieces. So you can learn it in a very fast pace.
Type is the first one, I love type, not only for the static typing, but also for the tooling it provided. Intellisense, aha, really great, you don’t need to read any source code or documentation. Just a single dot, and our extraordinary coder will show you their self-explained method name, and you can also know the type of the parameter. Win! But how?
Sometimes we need to match the binary number to the decimal number. But for people like me who is not that sensitive to binary, it seems they are all the same… So I need to write a table to match them. It is easy since binary has only 2 digits, 0 or 1. But the calculation could be nasty, and the layout would be annoying when the quantity gets bigger. And when the layout gets annoying, we will make mistakes. And nobody loves mistake.
But there is a simple way we can make this procedure in to a no-brainer. Let’s write down a 4-bits binary and decimal match table. Just check the one below. It is simple, isn’t it? Do you find any pattern?
You can always find O(n), O(log n) over the internet when people talking about the efficiency of the codes. Like any other magic which you will encounter, it will give you a big question mark. I assemble all the information I have, from my lectures, book readings, online information, personal understanding, then write down this article. Medium measures you can finish this article in 6 minutes, here are what you will get after the precious 6 minutes:
- How do we get the answer of Big O academically? (Rarely see online)
- How to measure the Big O for an algorithm practically?
A big plus: You don’t need any background to read this! Even a very beginner can understand this. Just a very little math (no computation). Hope it could help. Let’s start!