For the Apple interviews it was all systems programming stuff, e.g. "implement mmove", "read integers off the wire preserving endianness", etc. Amazon was much more focused on behavioral stuff (i.e. their leadership principles) and system design.
This was for Amazon L6 and Apple equivalent, nothing very senior.
Really? In my Amazon interview last month for a SWE position they asked a LeetCode style question after the initial phone screen about writing a social network data structure (a directed graph) and then asked me to write a method to traverse it to n-depth.