quadratic time 1. Run it through every compiler/interpreter 2. Choose the one generating the minimum amount of errors
linear time 1. Collect all tokens--words and symbols. 2. For a list of each language's tokens, find the set intersection with those found in (1). 3. Return the language corresponding to the largest result in (2).