Monthly Archives: January 2012

Basics of Object Oriented Programming

Below you’ll find some of the basic concepts of Object Oriented Programming: OOP: Object Oriented Programming is a software design philosophy or approach, which aims to model software closer to what we see in real life. While procedural languages like C focus on functions that manipulate data, OOP languages like C++ or Java focus on […]

Powerset Algorithm in C++

A powerset of a given set is the combination of all subsets, including the empty subset and the set itself. Suppose we have the following set: {1,2,3}. Its powerset would be: {1,2,3} {1,2} {1,3} {2,3} {1} {2} {3} Creating an algorithm to generate a powerset is not trivial. The first idea you can use is […]

Sets, Sequences and Tuples

If you are not sure about the differences between sets, sequences and tuples, here they are: Sequences: A sequence is an ordered list of elements, which can also be infinite (e.g., the sequence composed of the real numbers). Since order of elements matter, the sequence (1,2,3) is different from the sequence (1,3,2) or from the […]