Leetcode 1470: Shuffle the array

In this Leetcode problem, we try to shuffle the numbers in a array in a particular manner.

Problem statement

Solutions

I am always amazed how simple problems have many interesting solutions!

class Solution {
public int[] shuffle(int[] nums, int n) {
int[] res = new int[2…