mirror of
https://github.com/mudabbir-ahmad/Leet-Code-prog.git
synced 2026-10-08 02:30:21 +00:00
flowerbed
This commit is contained in:
1 parent
a851364814
commit
5fadd8b6e7
1 file changed
+1
-1
@@ -11,7 +11,7 @@ public:
|
||||
bool rightEmpty = (i == flowerbed.size()-1) || (flowerbed[i+1] != 1);
|
||||
bool currentEmpty = (flowerbed[i] != 1);
|
||||
|
||||
if (leftEmpty == true && leftEmpty == true && currentEmpty == true)
|
||||
if (leftEmpty == true && rightEmpty == true && currentEmpty == true)
|
||||
{
|
||||
flowerbed[i] = 1; y++;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user