Distribute Elements Into Two Arrays I Problem

Distribute Elements Into Two Arrays I Problem — ExecCode Easy DSA Practice

Solve the Distribute Elements Into Two Arrays I problem on ExecCode. Free online easy DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.

Description You are given a 1-indexed array of distinct integers nums of length n. You need to distribute all the elements of nums between two arrays arr1 and arr2 using n operations. In the first operation, append nums[1] to arr1. In the second operation, append nums[2] to arr2…

Practice Distribute Elements Into Two Arrays I free on ExecCode. Browse more ExecCode DSA problems.