Quantix Capital interview question

Java, C++