Pergunta de entrevista da empresa Meta

First question was about tree, it was a medium LC question. Connect next right pointer in a tree. The second was to find the Kth maximum element in an array.