From 3537a42d85a7197208a2ce407a5b7c3e7f44ad03 Mon Sep 17 00:00:00 2001 From: Shifat Date: Sun, 10 Nov 2019 12:18:53 +0600 Subject: [PATCH] trim comment --- binaryGap.php | 1 + 1 file changed, 1 insertion(+) diff --git a/binaryGap.php b/binaryGap.php index b380278..ccbe49d 100644 --- a/binaryGap.php +++ b/binaryGap.php @@ -3,6 +3,7 @@ function solution($n){ //Get the binary nof the number $bnry = decbin($n); + //trim zero from both sides $bnry=trim($bnry, "0"); //Explode string by 1-s //Compare the length of each