Amdocs interview question

algoritms question, linux, sql and logical