That is fascinating. I wouldn't even show up for an interview if they told me to prepare for that kind of exam. What kinds of companies are these and where are they located? Sounds like an interview designed by an omega nerd nightmare boss.
For example I tend not to prefer putting data into a class if it's not needed, but we had one interviewer who wanted all my logic as methods on a class even though it's fine to have functions operating on a data structure. Not a big deal either way right? But there it is... With the influx of candidates they measure this bs.
Yes, you can certainly find companies out there that don't interview in this way, but leetcode interviews are extremely common.