Check diagonal & compute window stats | Meta Interview Question