Tableau Software interview question

Implement two simple algorithms in C or C++