Infosys interview question

Kmp Binary search Dnf sort