Improved Bubble Sort

Almost every developer know how to implement the bubble sort for a simple array. We just need to travel over the array in two levels and swap the adjacent elements in the second level if their values’ order is not correct. The algorithm implement with Python is in the following Read more…

CPP – Partial Sort Algorithm

We need not sort all elements sometimes. Here are a few simple examples of STL algorithms partial_sort, nth_element, and partition. partial_sort For example, find the 5 biggest ones in 10 random numbers. #include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <algorithm> using namespace std; int main() { vector<int> values; Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X