I think this problem is not very hard and it's interesting.↵
↵
Description:↵
~~~~~↵
You are given $2$ arrays $a$ and $b$ and the length of them is $n$.↵
↵
- $1$, $3$, $5$, ......, $2 * n - 1$ is in $a$.↵
↵
- 2, 4, 6, ......, 2 * n is in b.↵
↵
~~~~~↵
Algorithm 1:↵
the O(n^2)'s Algorithm, ↵
↵
~~~~~↵
Your code here...↵
~~~~~↵
↵
↵
↵
↵
Description:↵
~~~~~↵
You are given $2$ arrays $a$ and $b$ and the length of them is $n$.↵
↵
- $1$, $3$, $5$, ......, $2 * n - 1$ is in $a$.↵
↵
- 2, 4, 6, ......, 2 * n is in b.↵
↵
~~~~~↵
the O(n^2)'s Algorithm, ↵
↵
~~~~~↵
Your code here...↵
~~~~~
↵
↵
↵