original_docstring: 
      Determine the eventual outcome of asteroids travelling through space
  
      Given:
          There are two directions: Negative and Positive
          There is one value: Size
  
      Returns:
          The eventual outcome wherein the smaller sized asteroids explode upon collision with larger asteroids.
  
      Theory:
          Approaching this problem from both ends with a double-ended queue will allow for speed O(1) pops on both ends.
          This is valuable because we can consider positive direction will go toward the right end and negative toward the left end.
  
      Runtime Result:
          best case: O(n)
          worst case: O(n*n)
  
          The best case scenario would be an array with all all negatives on the left of the positives
          132 ms	18.4 MB
  
      Thoughts:
          I didn't enjoy sovling this procedurally. I made two helper methods to help my brain, but I still got lost at times while developing this soultion.
          I now want to try solving this with the same algorithm but leveraging OOP.
  
      >>> s = Solution()
      >>> s.asteroidCollision([1,2,-1,-2])
      [1]
      >>> s.asteroidCollision([5, 10, -5])
      [5, 10]
      >>> s.asteroidCollision([8, -8])
      []
      >>> s.asteroidCollision([10, 2, -5])
      [10]
      
docstring: Determine the eventual outcome of asteroids travelling through space
  Given:
  There are two directions: Negative and Positive
  There is one value: Size
docstring_tokens: Determine the eventual outcome of asteroids travelling through space Given : There are two directions : Negative and Positive There is one value : Size
code: def asteroid_collision(asteroids: Deque[int]) -> Deque[int]:
      """
      Determine the eventual outcome of asteroids travelling through space
  
      Given:
          There are two directions: Negative and Positive
          There is one value: Size
  
      Returns:
          The eventual outcome wherein the smaller sized asteroids explode upon collision with larger asteroids.
  
      Theory:
          Approaching this problem from both ends with a double-ended queue will allow for speed O(1) pops on both ends.
          This is valuable because we can consider positive direction will go toward the right end and negative toward the left end.
  
      Runtime Result:
          best case: O(n)
          worst case: O(n*n)
  
          The best case scenario would be an array with all all negatives on the left of the positives
          132 ms	18.4 MB
  
      Thoughts:
          I didn't enjoy sovling this procedurally. I made two helper methods to help my brain, but I still got lost at times while developing this soultion.
          I now want to try solving this with the same algorithm but leveraging OOP.
  
      >>> s = Solution()
      >>> s.asteroidCollision([1,2,-1,-2])
      [1]
      >>> s.asteroidCollision([5, 10, -5])
      [5, 10]
      >>> s.asteroidCollision([8, -8])
      []
      >>> s.asteroidCollision([10, 2, -5])
      [10]
      """
      answer = []
      # Deque for the left side of asteroid comparison
      # This should only contain positive values
      remaining = deque()
  
      # Iterate through asteroids
      while asteroids:
          asteroid = asteroids.popleft()
          # asteroid is a positive direction asteroid
          if asteroid > 0:
              remaining.append(asteroid)
              asteroid = None  # short circuit
  
          # asteroid is negatively charged asteroid. Time to start comparing with remaining
          while asteroid:
              # compare with positive direction remaining
              if remaining:
                  _remaining_element = remaining.pop()
                  # If we detect a collision we need to evaluate the result
                  if detect_collision(_remaining_element, asteroid):
                      _negative, _positive = collide(_remaining_element, asteroid)
                      # print(_negative, _positive)
                  # If the remaining asteroid is negative it will need to be compared vs the remaining
                  if _negative:
                      asteroid = _negative
                  elif _positive:
                      # The positive astroid remains
                      remaining.append(_positive)
                      asteroid = None
                  else:
                      asteroid = None
              else:
                  # There are no remaining. Determine where to place asteroid.
                  if asteroid < 0:
                      answer.append(asteroid)
                  else:
                      remaining.append(asteroid)
                  asteroid = None
  
      return answer + list(remaining)
code_tokens: def asteroid_collision ( asteroids : Deque [ int ] ) -> Deque [ int ] : answer = [ ] remaining = deque ( ) while asteroids : asteroid = asteroids . popleft ( ) if asteroid > 0 : remaining . append ( asteroid ) asteroid = None while asteroid : if remaining : _remaining_element = remaining . pop ( ) if detect_collision ( _remaining_element , asteroid ) : _negative , _positive = collide ( _remaining_element , asteroid ) if _negative : asteroid = _negative elif _positive : remaining . append ( _positive ) asteroid = None else : asteroid = None else : if asteroid < 0 : answer . append ( asteroid ) else : remaining . append ( asteroid ) asteroid = None return answer + list ( remaining )
short_docstring: Determine the eventual outcome of asteroids travelling through space
  Given:
  There are two directions: Negative and Positive
  There is one value: Size
short_docstring_tokens: Determine the eventual outcome of asteroids travelling through space Given : There are two directions : Negative and Positive There is one value : Size
comment: """
      Determine the eventual outcome of asteroids travelling through space
  
      Given:
          There are two directions: Negative and Positive
          There is one value: Size
  
      Returns:
          The eventual outcome wherein the smaller sized asteroids explode upon collision with larger asteroids.
  
      Theory:
          Approaching this problem from both ends with a double-ended queue will allow for speed O(1) pops on both ends.
          This is valuable because we can consider positive direction will go toward the right end and negative toward the left end.
  
      Runtime Result:
          best case: O(n)
          worst case: O(n*n)
  
          The best case scenario would be an array with all all negatives on the left of the positives
          132 ms	18.4 MB
  
      Thoughts:
          I didn't enjoy sovling this procedurally. I made two helper methods to help my brain, but I still got lost at times while developing this soultion.
          I now want to try solving this with the same algorithm but leveraging OOP.
  
      >>> s = Solution()
      >>> s.asteroidCollision([1,2,-1,-2])
      [1]
      >>> s.asteroidCollision([5, 10, -5])
      [5, 10]
      >>> s.asteroidCollision([8, -8])
      []
      >>> s.asteroidCollision([10, 2, -5])
      [10]
      """$SEP$# Deque for the left side of asteroid comparison$SEP$# This should only contain positive values$SEP$# Iterate through asteroids$SEP$# asteroid is a positive direction asteroid$SEP$# short circuit$SEP$# asteroid is negatively charged asteroid. Time to start comparing with remaining$SEP$# compare with positive direction remaining$SEP$# If we detect a collision we need to evaluate the result$SEP$# print(_negative, _positive)$SEP$# If the remaining asteroid is negative it will need to be compared vs the remaining$SEP$# The positive astroid remains$SEP$# There are no remaining. Determine where to place asteroid.