Wednesday, April 26, 2017

ES6: Merge 2 Sorted Arrays

This is a very common coding exercise that may be asked of you when you interview for a tech company that carefully screens their candidates.

If you are going to do this similarly to the way way I do it below, you will need to understand these concepts.

  1. Array instance reduce() parameters and reduce() in general
  2. Array instance sort() parameters and sort() in general

Simply remembering the code will only take you so far. You may be asked to explain. It is a lot easier to remember something and explain it if you understand it. Memorizing might get you through a phone screen but not live coding.


No comments:

Post a Comment