Programming, Coding, Technology, Python, Leetcode.
times=int(input("Enter number of random numbers generated")) lst=preprocess(arr) ma={} for _ in range(times): rand=distribute(nums,lst) if rand not in ma: ma[rand]=1 else: ma[rand]+=1 # print(rand) print(ma) solution([1,2,3,4],[0.1,0.5,0.2,0.2]) #testing our solution And running this code 100,000