Marina Barsky 742b842c8a Update '.drone.yml' | 2 years ago | |
---|---|---|
include | 2 years ago | |
src | 2 years ago | |
test | 2 years ago | |
.drone.yml | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
Makefile | 2 years ago | |
README.md | 2 years ago |
Implement the body of the function create_palindrome (int *A, int size, int *B)
in file src/palindrome.c, where A
is an array of integers and has length size
, and B
is an integer array twice as long as A
.
Set values in B
such that every element of A
appears twice in B
: once in its original position, and a second time in the second half of B
.
The new occurrence should be the same distance from the end of B
as the first occurrence was from the beginning.
For example,
if A
is the array {1, 2, 5, 7}, then B
will be {1, 2, 5, 7, 7, 5, 2, 1}.