Rakuten interview question

Leetcode question like linked-list, decode string