NET Framework 6 adds the long-awaited Priority Queue to the list of collections. An example of usage of Priority Queues is getting the k-highest value in an array without sorting the array: the algorithm is keeps k values in the…
SortedSet uses a custom comparer for sorting items. The comparer serves two purposes: define a criterion for ordering items in the set (e.g. the Length property in the sample below), AND identify duplicate items, so that only one is present…
Dependency Injection (DI) and Inversion of Control (IoC) are popular patterns in modern software development that reduce coupling among modules and so improve the testability of the sames. As this article is not meant to be an introduction to DI…
In the article comparing CPU and GPU implementations of the median filter, the class was designed to receive image buffers with the AddSample method and return a pointer to the image buffer with the GetMedianImage method: class TM_CPURefImpl : public…
FizzBuzz is described as: Write a program that prints the integers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of…