import math

# Find Rotation Point
# You went and bought a copy of Webster's English dictionary on April Fool's Day and received the joke edition of the dictionary.
# You open it up and see that the first entry in the dictionary starts somewhere in the middle. Once the end of the alphabet is reached,
# it circles around and starts over at the 'A' section and goes all the way through until it reaches the beginning. Otherwise, though,
# everything else seems to be in order.

# For example, a rotated list of words might look something like this:

# const words = [
#   'ptolemaic',
#   'retrograde',
#   'supplant',
#   'undulate',
#   'xenoepist',
#   'asymptote',    // <-- rotation happens here
#   'babka',
#   'banoffee',
#   'engender',
#   'karpatka',
#   'othellolagkage',
# ]




# pick a word in our list



def findRotationPoint(words):
    startWord = words[]  # put 0 if it doesn't default

    while topIndex >= bottomIndex:
        # try word
        try =  # somthing  more operations follow

        if words[try] > startWord
        # file that word back into a list in the same order that it pulled from the "words" list so that in the end they are in order

        else:
          # if the try word is not greater than the startWord than we have our goodlen egg. Mission Complete
          # break loop

            # return out New list in ABC order


const words = [
    'ptolemaic',
    'retrograde',
    'supplant',
    'undulate',
    'xenoepist',
    'asymptote',    // <-- rotation happens here
    'babka',
    'banoffee',
    'engender',
    'karpatka',
    'othellolagkage',
]
