These are pretty fun. They are essentially the challenges on sites like Codewars. I really went at Codewars HARD for a few months, so I came into these with some experience.
Some high-level questions below:
Are these the things to expect in a hypothetical technical interview?
In other words, perhaps addition to having to verbally explain technical concepts, will we be asked to solve “simple” problems like these? If this is something to expect, do the interviewers care about clever one-liners, or that the code is readable? Or do they care that they pass, period?
Are/will we be asked to solve much more complex things?
Should I get good at the type of thing these are an example of?
i doubt that a basic algorithm would be part of a serious technical interview. You’d be expected to do harder things because the whole point is to see how you handle working out things that are not obvious.
You would also need to learn how to assess the performance (order notation).
I think you’be setting yourself up to fail if you try to go for the clever one-liner because that will likely mean you’ve misunderstood something or you’re missing some use-case. But even if you did, you’d have to be open to hearing what the interviewer has to say and even asking them questions to find out more about the use-cases.
Here’s a video I watched recently that may be useful to you as well