Fireblocks interview question

Leetcode question and an architecture question