摘要:
The common or classic Fibonacci algorithm //Util.h static unsigned long long factorialLoops; long double Fibonacci35(int len); //Util.cpp unsigned lon 阅读全文
摘要:
void Util::thread14(int x,int y,string str) { thread t1([](int xx,int yy,string sstr) { Util ul; for(int i=0;i<xx;i++) { cout<<"Num= "<<i<<","<<ul.get 阅读全文
摘要:
#include "Model/Util.h" char *Util::uuidValue = (char *)malloc(40); void Util::threadLambda6(int xx,int yy,string sstr) { thread t1([](int x,int y,str 阅读全文
摘要:
void thread28(int num,string sstr) { thread t([](int x,string str) { printNumUuid26(); printUuidNum27(); printUuid30(x); printUuid31(str); },num,sstr) 阅读全文
摘要:
void printArray17(int *arr, int len) { for (int i = 0; i < len; i++) { cout << arr[i] << "\t"; } cout << endl << endl; } void getArray16(int *arr, int 阅读全文
摘要:
//Utility.h #ifndef Utility_H #define Utility_H #include <ctime> #include <iostream> #include <thread> #include <unistd.h> #include <uuid/uuid.h> usin 阅读全文
摘要:
void Util::arrayAsc61(int len) { stringstream ss; int *arr = new int[len]; getArray23(arr, len); chrono::time_point<chrono::system_clock> startTime; c 阅读全文
摘要:
Original as below via recursion and will call the method itself for many times which is inefficient int Util::factorial54(int i) { if(i==0 ||i==1) { r 阅读全文
摘要:
void Util::fib53(int *arr, int num, int &result) { arr[0]=0; arr[1]=1; for(int i=2;i<=num;i++) { arr[i]=arr[i-2]+arr[i-1]; } for(int i=0;i<=num;i++) { 阅读全文
摘要:
void Util::getArray23(int *arr, int len) { srand(time(NULL)); for (int i = 0; i < len; i++) { arr[i] = rand(); } } void Util::printArray24(int *arr, i 阅读全文