We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6948877 + d95f16b commit c490dedCopy full SHA for c490ded
1550. Three Consecutive Odds
@@ -0,0 +1,10 @@
1
+class Solution {
2
+public:
3
+ bool threeConsecutiveOdds(std::vector<int>& arr) {
4
+ std::string binaryString;
5
+ for (int num : arr) {
6
+ binaryString += (num % 2) ? '1' : '0';
7
+ }
8
+ return binaryString.find("111") != std::string::npos;
9
10
+};
0 commit comments