Time machine

For my current project I’m using Java 11, and since I last used with version 8, I thought that would be interesting to check the latest features and get a better feel of where the language is going.

In the previous blog post I presented an exercise I sometimes use during interviews and I thought I would do it with Java 16 latest features.

The exercise is about representing a binary tree and then implementing an algorithm that adds a unique identifier to each node.

The examples I present in the previous blog post use a functional approach to implement…

I wanted to learn more about Dotty, the new compiler that will be used for Scala 3 so I thought of using it to solve a small problem.

I decided to use an exercise I use with candidates for a Scala position as a starting point for discussion. It consists in modelling a binary tree and writing a function that acts on it.

The problem

First I ask the candidate to model a binary tree, similar to the one the figure below:

Simple binary tree

And then we work together on how to write a function that adds a unique identifier to all nodes of…

Benoit Pasquereau

Tech lead and back-end dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store