diff --git a/daily/cpp/Nov-28-Number-of-ways-to-divide-a-long-corridor.cpp b/daily/cpp/Nov-28-Number-of-ways-to-divide-a-long-corridor.cpp index 290ca29..92f16b5 100644 --- a/daily/cpp/Nov-28-Number-of-ways-to-divide-a-long-corridor.cpp +++ b/daily/cpp/Nov-28-Number-of-ways-to-divide-a-long-corridor.cpp @@ -11,7 +11,8 @@ class Solution { if (corridor[i] == 'S') { chairs++; - while (++i < corridor.size() && corridor[i] != 'S'); + while (++i < corridor.size() && corridor[i] != 'S') + ; // the while increment i and check each character in the corridor // string. the loop continues until the end of the string or until the // next chair.