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++: 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++: 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 ReadingBest C++ Videos
[pt_view id="17aa22899c"]
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 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++: 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++: 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++: LZW Compression
The Lempel-Ziv-Welch (LZW) algorithm provides lossless data compression. You can read a complete description of it in the Wikipedia article on the sub
Continue ReadingC++: Execute Only Part of Loop
Quite often one needs loops which, in the last iteration, execute only part of the loop body. The goal of this task is to demonstrate the best way to
Continue Reading




