[pt_view id="17aa22899c"]
Continue ReadingC++: Binary Digits
The task is to output the sequence of binary digits for a given non-negative integer. The decimal value 5, should produce an output of 101 The deci
Continue ReadingC++: Fractal Tree
Generate and draw a fractal tree. To draw a fractal tree is simple: Draw the trunk At the end of the trunk, split by some angle and draw tw
Continue ReadingC++: Huffman Coding
Huffman encoding is a way to assign binary codes to symbols that reduces the overall number of bits used to encode a typical string of those symbols.
Continue ReadingC++: Man Or Boy Test
Background: The man or boy test was proposed by computer scientist Donald Knuth as a means of evaluating implementations of the ALGOL 60 programming
Continue ReadingC++: Maximum Triangle Path Sum
Starting from the top of a pyramid of numbers like this, you can walk down going one step on the right or on the left, until you reach the bottom row:
Continue ReadingC++: Levenshtein Distance
template <class T> unsigned int edit_distance(const T& s1, const T& s2) { const size_t len1 = s1.size(), len2 = s2.size(); vect
Continue ReadingC++: Dining Philosophers
The dining philosophers problem illustrates non-composability of low-level synchronization primitives like semaphores. It is a modification of a probl
Continue ReadingC++: File Input/Output
In this task, the job is to create a file called "output.txt", and place in it the contents of the file "input.txt", via an intermediate variable. In
Continue ReadingC++: Luhn Test of Credit Card Numbers
The Luhn test is used by some credit card companies to distinguish valid credit card numbers from what could be a random selection of digits. Those
Continue Reading




