Suggest a good method with least lookup time complexity

Printable View