Skip to content

Commit 8168b6b

Browse files
committed
docs(questionMarks): amend problem statement and fix comment typo
1 parent ef1804b commit 8168b6b

File tree

1 file changed

+6
-6
lines changed
  • src/algorithm_practice/String_Algorithms/questionMarks

1 file changed

+6
-6
lines changed

src/algorithm_practice/String_Algorithms/questionMarks/question.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
* Write a function that takes in a string and returns
1010
* a stringified boolean ("true" or "false"). The boolean
1111
* should indicate whether or not between every pair of single
12-
* digit numbers in the string, there are exactly three question
13-
* marks. The question marks do not have to be consecutive. It's
14-
* always wise to come up with a few different solutions, discuss
15-
* their performance and possibly implementation, and then figure
16-
* out which one to go with.
12+
* digit numbers in the string that add to 10, there are exactly
13+
* three question marks. The question marks do not have to be consecutive.
14+
* It's always wise to come up with a few different solutions, discuss their
15+
* performance and possibly implementation, and then figure out which one to
16+
* go with.
1717
*
1818
* 1.) The naive approach that is not the most optimized but would
1919
* easily get us the right answer is to have a vector of pairs, where
@@ -71,7 +71,7 @@ std::string questionMarks(const std::string& input) {
7171
if (qCount != 3) return "false";
7272
}
7373

74-
// Rest firstNum and qCount for next pair
74+
// Reset firstNum and qCount for next pair
7575
firstNum = charAsInt;
7676
qCount = 0;
7777
} else if (input[i] == '?') qCount++;

0 commit comments

Comments
 (0)