Archive for April, 2023

Maximum Difference in Array – C++

Lets assume we have a sorted array like : What is the maximum difference for two elements in this array such that larger member should appear after smaller one ? If it is sorted, we can simply say that maximum difference is between last element and first element. Simply 9-1 […]

Read More