ShoreTel interview question

Write a Programmer to get second largest integer with and without sorting?