minimum difference element in array algo added