Implement Mergesort.
mergesort and a merge function.O(n log n) time—that’s n steps to merge arrays, log n times.n elements stored in arrays to merge, it uses O(n) space.Familiarize yourself with the grading rubric, so you know how to score the interview.
Look for effective problem solving, efficient use of time, and effective communication with the whiteboard space available.
Every solution might look a little different, but the candidate should be able to test their solution with different inputs to verify correctness.
Assign points for each item on the Rubric, according to how well the candidate executed on that skill.
Add up all the points at the end, and record the total at the bottom of the page.

Record detailed notes on the rubric, to share with the candidate when the interview is complete.
algorithm MERGESORT:
declare array ARRAY <- input array
if ARRAY length is greater than 1:
declare number MID_INDEX <-- middle index value of ARRAY
declare array LEFT <-- array values from 0 to MID_INDEX
declare array RIGHT <-- array values from MID_INDEX to end of array
call MERGESORT on left
call MERGESORT on right
call MERGE on LEFT, RIGHT, and ARRAY
algorithm MERGE:
declare array LEFT <- input array
declare array RIGHT <- input array
declare array FULL <- input array
declare number I <-- starts at 0
declare number J <-- starts at 0
declare number K <-- starts at 0
while I is less than the length of LEFT and J is less than the length of RIGHT:
if the value of LEFT at I is less than or equal to the value of RIGHT at J:
set the value of FULL at position K <- LEFT at position I
increase I by 1
else:
set the value of FULL at position K <- RIGHT at position J
increase J by 1
increase K by 1
if I is equal to the length of LEFT:
set remaining entries in FULL to remaining values in RIGHT
else:
set remaining entries in FULL to remaining values in LEFT