Skip to content

Commit 07a7e84

Browse files
committed
gcd
1 parent a1f37da commit 07a7e84

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

check-if-it-is-a-good-array/gcd.hpp

Lines changed: 0 additions & 19 deletions
This file was deleted.

check-if-it-is-a-good-array/index.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using namespace std;
77
#include <algorithm>
88
#include <numeric>
99

10-
#include "gcd.hpp"
10+
// #include "gcd.hpp"
1111
namespace check_if_it_is_a_good_array
1212
{
1313

@@ -16,6 +16,7 @@ namespace check_if_it_is_a_good_array
1616
public:
1717
bool isGoodArray(vector<int> &nums)
1818
{
19+
// auto a = std::gcd(15, 20);
1920
int divisor = accumulate<std::vector<int>::iterator, int, int(int, int)>(
2021
nums.begin(), nums.end(), nums[0], gcd);
2122
return divisor == 1;

0 commit comments

Comments
 (0)