Skip to main content
added 19 characters in body
Source Link
Steve Bennett
  • 8.1k
  • 23
  • 74

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after repeatedly removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan or andothecancan

acaaaab => b

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after repeatedly removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after repeatedly removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan or andothecancan

acaaaab => b

there's nothing recursive about this task
Source Link

What's left after recursivelyrepeatedly removing palindromes

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after recursivelyrepeatedly removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

What's left after recursively removing palindromes

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after recursively removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

What's left after repeatedly removing palindromes

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after repeatedly removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

Became Hot Network Question
added 18 characters in body
Source Link
Steve Bennett
  • 8.1k
  • 23
  • 74

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after recursively removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after recursively removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

Sometimes a string has buried palindromes in it:

hallolilah contains lol.

And if we took out lol, we'd be left with halilah...which is another palindrome.

Write a program/function that returns the minimum letters left over after recursively removing palindromes of at least 3 letters.

Possibly the order in which palindromes are removed affects the number of letters remaining, hence "minimum".

Input

A string of lowercase letters.

Output

A string of leftover lowercase letters.

Scoring

Code golf

Sample data

bazookabambino => bazookmbino

bamalamacocob => `` (empty string)

boofrooracecarnaanoorfood => bd

gogogogogogogogogonow => w

nopalindromesinthisone => nopalindromesinthisone

canacandothecancan => cadothecancan

acaaaab => b

edited title
Link
Rhaixer
  • 2.5k
  • 13
  • 36
Loading
Source Link
Steve Bennett
  • 8.1k
  • 23
  • 74
Loading