Explain how you approach solving basic puzzle-based logic problems to demonstrate your analytical approach.
Implement one such puzzle by finding the only missing integer from an array containing distinct values in the range 0 through n. Use find_missing_number(nums). Return the missing integer as a number. The input array may be unordered, and the solution should run in linear time with constant extra space.
def find_missing_number(nums):