Languages may have features for dealing specifically with empty strings (those containing no characters). The task is to: Demonstrate how to a
Continue ReadingC++: Enforced Immutability
Demonstrate any means your language has to prevent the modification of values, or to create objects that cannot be modified after they have been creat
Continue ReadingC++: Fibonacci Sequence
The Fibonacci sequence is a sequence Fn of natural numbers defined recursively: F0 = 0 F1 = 1 Fn = Fn-1 + Fn-2, if n>1 Write a function to ge
Continue ReadingC++: Hailstone Sequence
The Hailstone sequence of numbers can be generated from a starting positive integer, n by: If n is 1 then the sequence ends. If n is even then
Continue ReadingC++: IBAN
The International Bank Account Number (IBAN) is an internationally agreed means of identifying bank accounts across national borders with a reduced ri
Continue ReadingC++: Ackermann Function
The Ackermann function is a classic example of a recursive function, notable especially because it is not a primitive recursive function. It grows ver
Continue ReadingC++: Deal Cards for FreeCell
Free Cell is the solitaire card game that Paul Alfille introduced to the PLATO system in 1978. Jim Horne, at Microsoft, changed the name to FreeCell a
Continue ReadingC++: Evolutionary Algorithm
Starting with: The target string: "METHINKS IT IS LIKE A WEASEL". An array of random characters chosen from the set of upper-case letters toge
Continue ReadingC++: Greatest Subsequential Sum
Given a sequence of integers, find a continuous subsequence which maximizes the sum of its elements, that is, the elements of no other single subseque
Continue ReadingC++: Mutual Recursion
Two functions are said to be mutually recursive if the first calls the second, and in turn the second calls the first. Write two mutually recursive
Continue Reading




