MAERSK interview question

HTML tags , linked list problem, basic sql question