Swap between rows
The idea is to swap between second and second last row
Ex = [1 2 3 4 5;
5 4 3 2 1;
1 2 3 4 5;
1 2 3 4 5;
...
5개월 전
문제를 풀었습니다
Half-Swap
Given a vector with an even number of elements,
rearrange it so that the elements in its first
half are switched with those i...
5개월 전
문제를 풀었습니다
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
5개월 전
문제를 풀었습니다
swap sign sum & multiply castles
It is an easy problem, if you know the answer.
Given a square matrix of NxN ordinary numbers.
Initially place N identical indi...