Category: Computer Science
-
Taming Computers
I’m starting a new series called Taming Computers. I will be blogging about multiple Computer Science concepts, basic and advanced. The idea behind this effort is to create a collection of material that I can later use for reference and create fun side projects.
-
Safe way to calculate the mid in a range
Given a range, calculating the mid is a straight forward process. But, there’s a problem with this line. Adding two large positive numbers can result in an overflow, if the sum is more than the max positive number. One way to fix it is to use the following: This’ll prevent the expression from overflowing to…