pym icon indicating copy to clipboard operation
pym copied to clipboard

Fixed the code in Matrix Multiplication in the file docs/datastructure.rst

Open RaviTejaKomma opened this issue 6 years ago • 2 comments

The matrix multiplication example in here gives wrong output: So changed the code from

c.append([a[i][j] * b[j][i] for j in range(0, n)])

to

c.append([ sum([a[i][k] * b[k][j] for k in range(0, n)]) for j in range(0,n) ])

and also the output of the code snippet

RaviTejaKomma avatar Jul 20 '18 11:07 RaviTejaKomma

Please squash the commit.

kushaldas avatar Jul 24 '18 13:07 kushaldas

Hello Kushaldas. I have squashed the commits to a single commit. Thanks :)

RaviTejaKomma avatar Jul 25 '18 13:07 RaviTejaKomma