Frage im Vorstellungsgespräch bei Google

How to computer the longest increasing sequence in an array with only one extra variable