Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

def maxsubArray ( a ) : n = len ( a ) if n = = 1 : return # your code here from random

def maxsubArray (a):
n=len(a)
if n==1 :
return
# your code here
from random import randint
assert (maxSubArray ,
assert (maxSubArray ,
assert (maxSubArray
def get_random_array (n) :
)>(100
lst randint (,25) for j in range (n)
lst []=1000
lst [10]=-15
lst [25]=4
1st[n-10]=60
Inst [n-3]=-4
return lst
maxSubArray (get_random_array (50000)
assert(maxSubArray (get_random_array (500000))
print('All tests passed (10 points!)')
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions