Skip to main content
5 of 9
added 70 characters in body
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140

05AB1E, 6 bytes

Çü-0‹Ù 

Try it online!

Wavy Cases:

0 - Decreasing Wavy

1 - Increasing Wavy

Not Wavy Cases:

[0,1] - Not wavy, initially decreasing, but then has an increase/equality that broke the pattern.

[1,0] - Not wavy, initially increasing, but then has a decrease/equality that broke the pattern

Explanation:

Ç # Push ASCII values for all characters in the string. ü # Push pairwise array. - # Calculate difference of pairs. 0‹ # Vectorize 1 if negative difference, 0 if positive difference. Ù # Uniquify using right most unique values first. 
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140