原创 [C++]數組模擬棧
template <typename value_type> class Stack { //the stack is a FILO container. static const int MAXSIZE = 1 << 10;
原创 [C++]迴文字符串判斷
Normal Version #include <iostream> #include <string> using namespace std; inline bool is_palindrome(const string str)
原创 [C++]素數判斷
引用:https://zh.wikipedia.org/wiki/%E7%B4%A0%E6%95%B0 質數(Prime number),又稱素數,指在大於1的自然數中,除了1和該數自身外,無法被其他自然數整除的數(也可定義爲只有1與該
原创 [C++]六種常見排序
目錄 希爾排序 快速排序 歸併排序 桶排序 冒泡排序 堆排序 引用:https://zh.wikipedia.org/wiki/%E5%B8%8C%E5%B0%94%E6%8E%92%E5%BA%8F