Nasdaq interview question

Identify certain patterns from large file using linux