Reduced time complexity
Reduced time complexity