Skip to main content
added 2 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140

05AB1E, 11 9 bytes thanks(Thanks to adnanAdnan)

Dg2›iÇü‹Ù 

Try it online!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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü‹Ù # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç Ç # Push ASCII values for all characters in the string. ü ü # Push pairwise array.   # Vectorize 1 if negative difference, 0 if positive difference.   Ù  # Uniquify using right most unique values first. # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 9 bytes thanks to adnan

Dg2›iÇü‹Ù 

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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü‹Ù # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç # Push ASCII values for all characters in the string. ü # Push pairwise array.  # Vectorize 1 if negative difference, 0 if positive difference.   Ù # Uniquify using right most unique values first. # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 9 bytes (Thanks to Adnan)

Dg2›iÇü‹Ù 

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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü‹Ù # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç # Push ASCII values for all characters in the string. ü # Push pairwise array.  # Vectorize 1 if negative difference, 0 if positive difference. Ù  # Uniquify using right most unique values first. # Else just print the string back, letting them know it's not valid input. 
deleted 27 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140

05AB1E, 1111 9 bytes thanks to adnan

Dg2›iÇü-0‹ÙDg2›iÇü‹Ù 

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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü-0‹ÙDg2›iÇü‹Ù  # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç # 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. # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 bytes

Dg2›iÇü-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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü-0‹Ù # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç # 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. # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 9 bytes thanks to adnan

Dg2›iÇü‹Ù 

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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü‹Ù  # Full program D # Push 2 copies of input. g2›i # If length is greater than 2. Ç # Push ASCII values for all characters in the string. ü # Push pairwise array.  # Vectorize 1 if negative difference, 0 if positive difference. Ù # Uniquify using right most unique values first. # Else just print the string back, letting them know it's not valid input. 
added 26 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140

05AB1E, 11 bytes

Dg2›iÇü-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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

DDg2›iÇü-0‹Ù # Full program D  # Push 2 copies of input. g2›i  # If length is greater than 2.   Ç # 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.   # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 bytes

Dg2›iÇü-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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

D # Push 2 copies of input. g2›i  # If length is greater than 2.   Ç # 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.   # Else just print the string back, letting them know it's not valid input. 

05AB1E, 11 bytes

Dg2›iÇü-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

Input String - Not possible to be wavy in the first place due to length.

Explanation:

Dg2›iÇü-0‹Ù # Full program D  # Push 2 copies of input. g2›i # If length is greater than 2. Ç # 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. # Else just print the string back, letting them know it's not valid input. 
added 331 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading
added 70 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading
added 18 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading
added 18 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading
Post Undeleted by Magic Octopus Urn
added 132 characters in body
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading
Post Deleted by Magic Octopus Urn
Source Link
Magic Octopus Urn
  • 20.9k
  • 6
  • 66
  • 140
Loading