If you require a hint, refer this :


#1

Since comparing each and every row will give TLE, you can store the rows as string in a map. And then check if current (row converted into string) exists in map, if yes then put row number in answer.