The definition of the sequence is colloquially described as: Starting with the list [1,1], Take the last number in the list so far: 1, I'll ca
Continue ReadingC++: Forward Difference
Provide code that produces a list of numbers which is the n-th order forward difference, given a non-negative integer (specifying the order) and a lis
Continue ReadingC++: Balanced Ternary
Balanced ternary is a way of representing numbers. Unlike the prevailing binary representation, a balanced ternary integer is in base 3, and each digi
Continue ReadingC++: Root Mean Square
Compute the Root mean square of the numbers 1..10. The root mean square is also known by its initial RMS (or rms), and as the quadratic mean. Th
Continue ReadingImprove INSERT-per-second performance of SQLite?
Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts-per-second to over 96 000 inserts-per-second! Back
Continue ReadingC++: Single Inheritance
Inheritance is an operation of type algebra that creates a new type from one or several parent types. The obtained type is called derived type. It inh
Continue ReadingC++: Day of the Week
A company decides that whenever Xmas falls on a Sunday they will give their workers all extra paid holidays so that, together with any public holidays
Continue ReadingC++: Create a Two-Dimensional Array at Runtime
Get two integers from the user, then create a two-dimensional array where the two dimensions have the sizes given by those numbers, and which can be a
Continue ReadingC++ Code
[pt_view id="e30eb21e03"]
Continue ReadingC++: Binary Search Tree Insertion
void insert(Node*& root, int data) { if (!root){ root = new Node(data); } else if (data < root->data){ insert(root->left,
Continue Reading




