Skip to content

Commit aece5a2

Browse files
committed
docs: Documentation updated
1 parent 19dc886 commit aece5a2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

greedy_algorithms/binary_addition.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
*/
2727
namespace greedy_algorithms {
2828
/**
29-
* A class to perform binary addition of two binary strings.
29+
* @brief A class to perform binary addition of two binary strings.
3030
*/
3131
class BinaryAddition {
3232
public:
3333
/**
34-
* Adds two binary strings and returns the result as a binary string.
35-
*
34+
* @brief Adds two binary strings and returns the result as a binary string.
3635
* @param a The first binary string.
3736
* @param b The second binary string.
3837
* @return The sum of the two binary strings as a binary string, or an empty
@@ -69,7 +68,7 @@ class BinaryAddition {
6968

7069
private:
7170
/**
72-
* Validates whether a string contains only binary characters (0 or 1).
71+
* @brief Validates whether a string contains only binary characters (0 or 1).
7372
* @param str The string to validate.
7473
* @return true if the string is binary, false otherwise.
7574
*/
@@ -81,7 +80,7 @@ class BinaryAddition {
8180
} // namespace greedy_algorithms
8281

8382
/**
84-
* Function to run tests for the addBinary method.
83+
* @brief Function to run tests for the addBinary method.
8584
*/
8685
void tests() {
8786
greedy_algorithms::BinaryAddition binaryAddition;
@@ -110,10 +109,9 @@ void tests() {
110109
}
111110

112111
/**
113-
* Main function to execute the program.
112+
* @brief main function
114113
*/
115114
int main() {
116-
tests();
117-
std::cout << "All tests passed.\n";
115+
tests(); /// To execute tests
118116
return 0;
119117
}

0 commit comments

Comments
 (0)