Programming Question-3 randomizedContraction