Skip to main content
Commonmark migration
Source Link

#PHP, 66 bytes

PHP, 66 bytes

$a=$s=$r=str_split($argv[1]);sort($s);rsort($r);echo$s==$a|$r==$a; 

takes input from command line argument. Run with -r.

#PHP, 66 bytes

$a=$s=$r=str_split($argv[1]);sort($s);rsort($r);echo$s==$a|$r==$a; 

takes input from command line argument. Run with -r.

PHP, 66 bytes

$a=$s=$r=str_split($argv[1]);sort($s);rsort($r);echo$s==$a|$r==$a; 

takes input from command line argument. Run with -r.

Source Link
Titus
  • 14.9k
  • 1
  • 25
  • 41

#PHP, 66 bytes

$a=$s=$r=str_split($argv[1]);sort($s);rsort($r);echo$s==$a|$r==$a; 

takes input from command line argument. Run with -r.