def nonConstructibleChangeBetter(coins):
	"""
		Takes an arrary of coin values and find the minimum change that can't be made by the coins
		available in the array.
		solution complexity : O(nlogn) time complexity and O(1) space complexity and has less lines of code.
		args:
		-----------
		coins (array): an array contains available coin values.
		
		output:
		-----------
		number (int) : represent the minimum amount of change that can't be made by the coins.
	"""

	currentChange = 0
	# sort the array
	coins.sort()
	# iterate through the array and find the minimum change and return
	# if current itaration stage can't find minimum change add current coin 
	# with the current change and make new current change.
	for coin in coins:
		if currentChange + 1 < coin:
			return currentChange + 1
		currentChange += coin
		
	return currentChange + 1