Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Determinant by TovarischZhukov
def checkio(data):
if len(data)==1:
retval = data[0][0]
else:
retval = 0
for i in range(len(data)):
new_data=[]
for elem in data[1:]:
new_data.append([])
for j, val in enumerate(elem):
if j != i:
new_data[-1].append(val)
retval+=data[0][i]*(-1)**i*checkio(new_data)
return retval
Dec. 19, 2015