Skip to main content
added 101 characters in body
Source Link
math scat
  • 9.5k
  • 11
  • 13

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • If there isn't any solution in the dictionary, then you have to output nothing/return an empty list
  • Default Loopholes apply
  • This is , so the shortest answer wins!

ExamplePosted here

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • If there isn't any solution in the dictionary, then you have to output nothing/return an empty list
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

Posted here

added 101 characters in body
Source Link
math scat
  • 9.5k
  • 11
  • 13

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • It is not guaranteed, that there's a wordIf there isn't any solution in the dictionary given which satisfies the riddle, then you have to output nothing/return an empty list
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • It is not guaranteed, that there's a word in the dictionary given which satisfies the riddle
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • If there isn't any solution in the dictionary, then you have to output nothing/return an empty list
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

added 101 characters in body
Source Link
math scat
  • 9.5k
  • 11
  • 13

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • It is not guaranteed, that there's a word in the dictionary given which satisfies the riddle
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

Word stays a word after taking away a letter

This is a repost of this challenge


Challenge

There is an old, popular riddle:

Find an English word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there are no letters left.

Example solution:

starting
staring
string
sting
sing
sin
in
I

Your task is to write a program, which takes a dictionary and outputs the longest word, that still occurs in the dictionary after repeatedly taking away a letter.

Rules

  • All words will be lower case and contain only ASCII-letters
  • If multiple valid words have the same length you can output any one of those
  • The dictionary will never be empty
  • It is not guaranteed, that there's a word in the dictionary given which satisfies the riddle
  • Default Loopholes apply
  • This is , so the shortest answer wins!

Example

In: [this, hat, hi, is, i, a, at]
Out: this

In: [pings, aid, pin, ad, i, in]
Out: aid

In: ['as', 'i', 'his', 'that', 'ping', 'pin', 'in', 'was', 'at', 'this', 'what', 'is', 'it', 'and', 'a', 'in', 'can', 'if', 'an', 'hand', 'land', 'act', 'ask', 'any', 'part', 'man', 'mean', 'many', 'has', 'stand', 'farm', 'eat', 'main', 'wind', 'boat', 'ran', 'heat', 'east', 'warm', 'fact', 'fast', 'rain', 'art', 'heart', 'am', 'arm', 'sit', 'train', 'sat', 'gas', 'least', 'fit', 'flat', 'cat', 'bit', 'coast', 'sand', 'beat', 'hit', 'party', 'wing', 'wash', 'bat', 'meat', 'suit', 'fat', 'meant', 'coat', 'band', 'win', 'seat', 'hat', 'salt']
Possible outputs:
1. stand (stand -> sand -> and -> an -> a)
2. heart (heart -> heat -> eat -> at -> a)
3. train (train -> rain -> ran -> an -> a)
4. least (least -> east -> eat -> at -> a)
5. coast (coast -> coat -> cat -> at -> a)
6. party (party -> part -> art -> at -> a)
7. meant (meant -> meat -> eat -> at -> a)

yeear
Source Link
math scat
  • 9.5k
  • 11
  • 13
Loading
edit @DLosc
Source Link
math scat
  • 9.5k
  • 11
  • 13
Loading
clean up rules. (rule #1 is vague and doesnt' add anything beyond our standard IO defaults. rule #2 is "your answer must solve the challenge" - obvious)
Source Link
pxeger
  • 24.6k
  • 27
  • 34
Loading
Source Link
math scat
  • 9.5k
  • 11
  • 13
Loading