Started at 22:35 at 08.08.2020 Satruday Aug. Finished at 22:43 at 08.08.2020 Satruday Aug. (0hrs 8minutes)
Last active
August 8, 2020 15:43
-
-
Save lbvf50mobile/4c37fdca161bfced1bc275c6f0abff59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# https://www.codewars.com/kata/59b2883c5e2308b54d000013 Onion array. | |
function is_onion_array(array $a): bool { | |
for($i=0, $j= count($a) - 1; $i < $j; $i+=1, $j-=1) if($a[$i] + $a[$j] > 10) return false; | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment