Synoriq interview question

In Technical interview there is coding question to solve.