71

Algorithm’s Efficiency | Big O “In Simple English”

 4 years ago
source link: https://www.tuicool.com/articles/7FJJvee
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Let’s start with a short popular fun story:

I’m originally from the D.R.Cong, in Central Africa and we have a very low internet speed. For illustration, opening a Gmail might take about 3 to 5 min of loading time (sometimes the whole process might just failed and time out).

In 2009, a company in South Africa had a similar issue: “really slow internet speed”. The company had two offices located about 50 miles away from each other and they decided to set up a fun test to see if it would be faster to transfer data over their very much slow internet or via carrier pigeon .

Q3IZraN.png!web

Pic credit: HackerRank’s Cracking The Coding Interview Tutorial

So they stored 4GB of data in a USB drive, strapped it to a pigeon and flew it from one office to the other office, 50 miles away . Guess what…

The carrier pigeon beat the internet .

The pigeon won by a huge margin otherwise it wouldn’t be a fun story. Furthermore, Only about 4% of the data was sent through the internet as the pigeon reached the second office located 50 miles away in 2 hours .

Useful tip:Use Bit ( Github ) to encapsulate components with all their dependencies and setup. Build truly modular applications with better code reuse, simpler maintenance, and less overhead.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK