This string, "sadbpstcrdvaefikkgoenqrt" has a five letter word embedded within it.
Here's a clue on how to find it:
string can be broken up from left to right into a series of overlapping letter triplets.Given the string and length of the secret word, improvise a function that finds the secret word.
secret_word("sadbpstcrdvaefikkgoenqrt", 5) ➞ "brake"
# sa(dbp)st(crd)(vae)f(ikk)g(oen)qrt
# The values of the triplets in parentheses are 22, 25, 28, 31, 34.
# An arithmetic series with difference of 3.
secret_word("aheiayd", 3) ➞ "hey"
# (a[he)i](ayd)
# The triplets with the secret letters can overlap.
# ahe=14, hei=22, ayd=30; a series with a difference of 8.
N/A