beginner katas
This commit is contained in:
26
Rotate for a Max/rotate_for_a_max.cpp
Normal file
26
Rotate for a Max/rotate_for_a_max.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include <vector>
|
||||
|
||||
class MaxRotate
|
||||
{
|
||||
public:
|
||||
static long long maxRot(long long n);
|
||||
static void getNums(long long input);
|
||||
static long long getValueFromDigits(std::vector<int> &digits);
|
||||
|
||||
static void getNums(std::vector<int> &digits, long long input){
|
||||
if (input > 9) {
|
||||
getNums(digits, input / 10);
|
||||
}
|
||||
digits.push_back(input % 10);
|
||||
}
|
||||
|
||||
static long long getValueFromDigits(std::vector<int> &digits){
|
||||
for(auto &i : digits){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static long long maxRot(long long n){
|
||||
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user