LIBSYS (India) Interview Question

A Difficult question from the patterns