Given an array, increment any duplicate values until every element is unique. Return the minimum sum of elements for the unique array.
Anonymous
May be this can be done easily with recursion or some optimized method. Here is easy answer. array=[1,1,1,1] u_array=[1,2,3,4] def uniquearry(array): array.sort() while len(set(array))
Check out your Company Bowl for anonymous work chats.