Draft

Merge sorted arrays without built-in functions

Description:

Hey Warriors!

Nowadays we have cool built-ins and it's easy to forget that in the past data transformations are made with raw code.

I challange You to write a function mergeArrays(arr1, arr2) which gets two, already sorted arrays and returns a single array containing both.

Rules:

  • The return array should contain all values.
  • NO BUILT-INS ALLOWED, DON'T EVEN TRY (enumerate, len, append, sorted, pop, insert, extend, sort, ...) are disabled

Input arrays contains integer values, and they are already sorted, take advantage of this!

Example:

print(mergeArrays([1, 3, 5], [2, 4, 6])
>> [1, 2, 3, 4, 5, 6]

If you liked the kata please rate and leave a feeback ;) Have fun!

Arrays
Logic
Algorithms

Stats:

CreatedSep 4, 2016
Warriors Trained319
Total Skips48
Total Code Submissions501
Total Times Completed112
Python Completions112
Total Stars5
% of votes with a positive feedback rating79% of 64
Total "Very Satisfied" Votes44
Total "Somewhat Satisfied" Votes13
Total "Not Satisfied" Votes7
Total Rank Assessments69
Average Assessed Rank
6 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • szepnapot Avatar
  • Blind4Basics Avatar
Ad