Lokal App interview question

1. Nearest smaller element this was the question.