Problem I have a small “plugin system” (I’m not sure this is the right name). It allow you to store […]
Tag: c++11
Console-based table structure
Problem Personally I often prefer console applications over GUI applications. However, sometimes it is quite a challenge to display everything […]
UVA 100: “The 3n + 1 problem”
Problem I’ve solved UVA Problem 100: The 3n + 1 problem . In short, the task was to write a […]
Safe strcpy implementation with C++
Problem After reading this article, I’ve decided to take a crack at implementing a “safe_strcpy” function that would remove some […]
Smallest element in an array that is repeated exactly ‘k’ times
Problem This is a problem from GeeksForGeeks and I have tried to solve it on my own and I have […]
Iteration to recursive function
Problem In my first iterative algorithm, I do this for (auto &widget : controls.getWidgets()) { if (!widget->visible) continue; widget->draw(); for […]
MemoryPuzzle game in the console
Problem I made my first console game in C++. It is a simple game. The game is also known as […]
Binary Search Tree implementation with unique pointers
Problem I have implemented a binary search tree using templates and unique_ptr in C++ 11. At present, only insertion and […]
Linked List reversal
Problem Recursive version. The only interesting function: List& List::reverse() { if (empty()) { return *this; } int val = head(); […]
C++ algorithm to implement multiple operators in one
Problem I have a class called IntMatrix which has 2 fields: Dimensions dimensions;//To save height and width of my matrix […]