The Stability Of Sorting Algorithm

If two numbers are equal and the relative positions are not changed after sorting, we think the sorting algorithm is stable. Stable sort algorithm: bubble sort, insert sort and merge sort. Unstable sort algorithm: quick sort, heap sort. Introduce an unstable sort algorithm quick sort. Its core thought is divide Read more…

Unit Test Based On QT

Simple Unit Test Project Let’s create a new unit test project firstly. Write our test functions in feild private Q_SLOTS for the class. tst_string.cpp: #include <QString> #include <QtTest> class String : public QObject { Q_OBJECT public: String(); private Q_SLOTS: void toUpper(); }; String::String() { } void String::toUpper() { QVERIFY2(true, “Failure”); Read more…

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

X