In a month I’ll be starting a new job which will be focused on big data using Scala and Apache Spark.
In preparation, I’ve been re-familiarising myself with Scala by implementing various of the most common data structures and algorithms in Scala.
When comparing how C# (my current occupation programming language) programmers and Scala programmers implement the merge sort, I noticed they are usually quite different in approach. This is partly due to C# and Scala implementing their list data type very differently.
So to help me with my understanding of the merge sort, I decided to try and write it in C# in a way that people generally implement it in Scala.
This github link shows what I came up with.
I think this has helped my understanding of the logic and implementation of the merge sort, so I may continue doing this with other algorithms. As that forces me to really understand what is going on instead of memorising the code.