The point of a leetcode style question is to test someones' ability to explain and adapt a tricky problem on the fly. Given most of a software engineer's day to day is about communication and adapting existing solutions to related problems, leetcode problems are a very powerful tool for analyzing candidates.