Learn C++: Part 01 – Program and Programming Language

CONCEPT: A program is a set of instructions a computer follows in order to perform a specific task. A programming language is a special language used to write computer programs. What Is a Program? Computers are designed to follow instructions. A computer program is a set of instructions that tells the computer how to solve a problem […]

Continue Reading →
 

Why is it Faster to Process A Sorted Array Than An Unsorted Array

Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster. With a sorted array, the condition data[c] >= 128 is first false for a streak of values, then becomes true for all later values. That’s easy to predict. With […]

Continue Reading →