Meta interview question

Two LC-style questions (Both medium difficulty)