Please try optimizing the efficiency of your solution and submit again. You can also visit the discussion forum to see if your peers have experienced and found resolutions for similar errors, or if course staff have provided prior guidance for these errors…