Write pseudocode for Strassen’s algorithm.

$$\textsc {Square-Matrix-Multiply-Strassen }(A, B)$$\begin{aligned}1& \quad n=A.rows \\2& \quad \text {let }C\text { be }\text { a }\text { new }n\times\,\,n\text { matrix } \\3& \quad \textbf {if }n==1 \\4& \quad \qquad c_{11}=a_{11}\cdot\,\,b_{11} \\5& \quad \textbf {else }\text { partition }A,\,B,\,\text { and }C \\6& \quad \qquad \text {let }S_{1,}\,S_{2,}\,\dots,\,\text { and }S_{10}\text { be }10\text { new }n/2\times\,\,n/2\text { matrices } \\7& \quad \qquad \text {let }P_{1,}\,P_{2,}\,\dots,\,\text { and }P_{7}\text { be }7\text { new }n/2\times\,\,n/2\text { matrices } \\8& \quad \\9& \quad \qquad \textbf {// } \text { calculate }\text { the }\text { sum }\text { matrices } \\10& \quad \qquad S_{1}=B_{12}-B_{22} \\11& \quad \qquad S_{2}=A_{11}+A_{12} \\12& \quad \qquad S_{3}=A_{21}+A_{22} \\13& \quad \qquad S_{4}=B_{21}-B_{11} \\14& \quad \qquad S_{5}=A_{11}+A_{22} \\15& \quad \qquad S_{6}=B_{11}+B_{22} \\16& \quad \qquad S_{7}=A_{12}-A_{22} \\17& \quad \qquad S_{8}=B_{21}+B_{22} \\18& \quad \qquad S_{9}=A_{11}-A_{21} \\19& \quad \qquad S_{10}=B_{11}+B_{12} \\20& \quad \\21& \quad \qquad \textbf {// } \text { calculate }\text { the }\text { product }\text { matrices } \\22& \quad \qquad P1=\textsc {Square-Matrix-Multiply-Strassen}(A_{11,}\,S_{1)} \\23& \quad \qquad P2=\textsc {Square-Matrix-Multiply-Strassen}(S_{2,}\,B_{22)} \\24& \quad \qquad P3=\textsc {Square-Matrix-Multiply-Strassen}(S_{3,}\,B_{11)} \\25& \quad \qquad P4=\textsc {Square-Matrix-Multiply-Strassen}(A_{22,}\,S_{4)} \\26& \quad \qquad P5=\textsc {Square-Matrix-Multiply-Strassen}(S_{5,}\,S_{6)} \\27& \quad \qquad P6=\textsc {Square-Matrix-Multiply-Strassen}(S_{7,}\,S_{8)} \\28& \quad \qquad P7=\textsc {Square-Matrix-Multiply-Strassen}(S_{9,}\,S_{10)} \\29& \quad \\30& \quad \qquad \textbf {// } \text { calculate }\text { the }\text { final }\text { product }\text { sub }\text { matrices } \\31& \quad \qquad C_{11}=P_{4}+P_{5}+P_{6}-P_{2} \\32& \quad \qquad C_{12}=P_{1}+P_{2} \\33& \quad \qquad C_{21}=P_{3}+P_{4} \\34& \quad \qquad C_{22}=P_{1}+P_{5}-P_{3}-P_{7} \\35& \quad \textbf {return }C \\\end{aligned}