Home > Algorithms, General > Few rules of thumb

## Few rules of thumb

Following are some of rules of thumb that one may want to remember for solving complex problems or while estimating time and space complexities (in computer terms) of certain scenarios

1. Light travels one foot in a nanosecond (one billionth of a second).
2. Approximately  π(≈ 3.15) hundredths of a second is a nanoyear (one billionth of a year).
3. It takes between 1 and 10 nanoseconds (ns) to store a value in Java. Basic math operations take a similar length of time.
4. An array assignment is approximately twice as slow as a regular assignment.
5. A Vector assignment is approximately 50 times slower than a regular assignment.
6. Modern computers execute 1 billion instructions per second.
7. A character is represented by 8 bits (approximately 10).
8. An Ethernet network can transmit at 100 million bits per second (expected throughput is nearer 10 million bits).
9. Fewer than 100 words made up 50 percent of Shakespeare’s writing; they have an average length of π. A core of 3000 words makes up 90 percent of his vocabulary; they have an average of 5.5 letters.

I got this list from Data Structures for Principled Programmer. With the help of Rule # 7 let’s try solving a problem in my next post… 🙂

Categories: Algorithms, General