8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfeb664 commit 729eec6Copy full SHA for 729eec6
algorithms/cpp/lexicographicalNumbers/LexicographicalNumbers.cpp
@@ -99,10 +99,10 @@ public :
99
//start point
100
public:
101
vector<int> lexicalOrder(int n) {
102
- //srand(time(NULL));
103
- //if (rand()%2)
104
- // return lexicalOrder02(n); // recursive way 560ms
105
- //else
+ srand(time(NULL));
+ if (rand()%2)
+ return lexicalOrder02(n); // recursive way 560ms
+ else
106
return lexicalOrder03(n); // non-recursive way, 460ms
107
}
108
0 commit comments