<prompt> Tengeneza algoriti bora ya kubadilisha safu3, 5, 6, 9, 12  <response>: def reverse_arraysafu: kushoto 0 kulia lensafu - 1 wakati kushoto kulia: temp safukushoto safukushoto safukulia safu kulia temp kushoto 1 kulia - 1 safu ya kurudi 