Condition when to traverse Bottom Diagonal of the matrix
if ( flag ) : NEW_LINE INDENT a = k1 NEW_LINE k1 = k2 NEW_LINE k2 = a NEW_LINE if ( flag ) : NEW_LINE INDENT flag = False NEW_LINE DEDENT else : NEW_LINE INDENT flag = True NEW_LINE DEDENT k1 += 1 NEW_LINE DEDENT else : NEW_LINE INDENT a = k1 NEW_LINE k1 = k2 NEW_LINE k2 = a NEW_LINE if ( flag ) : NEW_LINE INDENT flag = False NEW_LINE DEDENT else : NEW_LINE INDENT flag = True NEW_LINE DEDENT DEDENT print ( ) NEW_LINE return False NEW_LINE