In this task, the job is to verify the size of a file called "input.txt" for a file in the current working directory and another one in the file syste
Continue ReadingC++: Casting Out Nines
A task in three parts: Part 1 Write a procedure (say co9(x)) which implements Casting Out Nines as described by returning the checksum for x.
Continue ReadingC++ Puzzles/Games
[pt_view id="fa2c5f1466"]
Continue ReadingC++: Binary Search Tree Verification
struct TreeNode { int data; TreeNode *left; TreeNode *right; }; bool isBST(TreeNode *node, int minData, int maxData) { if(node == NULL
Continue ReadingC++: Euler Method
Euler's method numerically approximates solutions of first-order ordinary differential equations (ODEs) with a given initial value. It is an explicit
Continue ReadingC++: Catalan Numbers
Catalan numbers are a sequence of numbers which can be defined directly: Or recursively: Or alternatively (also recursive):
Continue ReadingC++: Iterated Digits Squaring
If you add the square of the digits of a Natural number (an integer bigger than zero), you always end with either 1 or 89: 15 -> 26 -> 40 ->
Continue ReadingC++: Fast Fourier Transform
The purpose of this task is to calculate the FFT (Fast Fourier Transform) of an input sequence. The most general case allows for complex numbers at t
Continue ReadingC++: Generate Random Number in Range
int random_in_range(int a, int b) //Function that returns a random integer between 2 provided integers { return a + random() % (b-a+1); }
Continue ReadingC++: Determine if Only One Instance Is Running
This task is to determine if there is only one instance of an application running. If the program discovers that an instance of it is already running,
Continue Reading




