Apple·Software Engineer·Technical Phone Screen
- What are the key differences between Python lists and dictionaries in terms of time complexity, iteration order, mutability, and memory usage? Also, how would you transform a list using map() versus a list comprehension, and when would you pick one over the other?
- Explain what the CPython GIL is and how it affects multithreaded programs. When would you use threading versus multiprocessing, and how do you share state safely between threads or processes while avoiding race conditions and deadlocks?
“I fumbled a bit on memory behavior.”