Pergunta de entrevista da empresa Paysend

On the interview with CTO I expected to answer some behavioral question, but instead got asked that leetcode problem. The problem: Imagine a Domino game. Each domino piece has 2 sides with numbers from 0 to 6. Given an array of these pieces, write an algorithm that would connect all domino pieces (sort them basically in the order that is correct, and it can go both sides). 45 minutes total interview length.

Resposta da entrevista

Sigiloso

10 de abr. de 2025

Wrote an algorithm that was in O(n squared), that was not functional, but close to it. Pointed out places where i should trouble-shoot, handled all side cases and exception throwings. Asked a lot of questions along the way if the i interpreted the requirements correctly and ways to handle side cases.