We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
fromrandomimportrandintclassTestDataEmptyArray():@staticmethoddefget_array():return[]classTestDataUniqueValues():_seq=[]@staticmethoddefget_array():random=randint(3,11)TestDataUniqueValues._seq=[iforiinrange(0,random)]returnTestDataUniqueValues._seq@staticmethoddefget_expected_result():returnTestDataUniqueValues._seq.index(min(TestDataUniqueValues._seq))### had to shorten next class name cause of spam blocker###classTestDataExactlyTwoDiffMin():_seq=[]@staticmethoddefget_array():random=randint(3,11)TestDataExactlyTwoDiffMin._seq=[iforiinrange(0,random)]TestDataExactlyTwoDiffMin._seq.insert(0,TestDataExactlyTwoDiffMin._seq[0])returnTestDataExactlyTwoDiffMin._seq@staticmethoddefget_expected_result():diff2=TestDataExactlyTwoDiffMin._seqreturndiff2.index(min(diff2))``
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 27: Testing
You are viewing a single comment's thread. Return to all comments →