The task is to write a player for the game that follows the following rules: The scorer will choose a number between set limits. The computer pla
Continue ReadingC++: Normal CDF
const double Pi = 3.14159265359; // Standard Normal cumulative distribution function double Normal_CDF(const double & x) { double k = 1
Continue ReadingC++: Black Scholes Call Option Delta
// Calculate the Black Scholes European call option Delta double BS_Call_Option_Delta(double S, double K, double r, double v, double T) // Para
Continue ReadingC++: Compare a List of Strings
Given a list of arbitrarily many strings, show how to: test if they are all lexically equal test if every string is lexically less than the on
Continue ReadingC++: Continuous Knapsack Problem
A robber burgles a butcher's shop, where he can select from some items. He knows the weights and prices of each items. Because he has a knapsack with
Continue ReadingC++: Do While Loop
Start with a value at 0. Loop while value mod 6 is not equal to 0. Each time through the loop, add 1 to the value then print it. The loop must execute
Continue ReadingC++ Graphics
[pt_view id="e8370874e7"]
Continue ReadingC++: Matrix Transposition
Transpose an arbitrarily sized rectangular Matrix. Library: Boost.uBLAS #include <boost/numeric/ublas/matrix.hpp> #include <boost/nu
Continue ReadingC++: Move-To-Front Algorithm
Given a symbol table of a zero-indexed array of all possible input symbols this algorithm reversibly transforms a sequence of input symbols into an ar
Continue ReadingC++: What is The Rule of Three?
What does copying an object mean? What are the copy constructor and the copy assignment operator? When do I need to declare them myself? How can I
Continue Reading




