Answer core Python, CS, DB, and testing questions
Company: TikTok
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
## Fundamentals (Python / CS / DB / OS / Web / Testing)
Answer the following interview prompts. Keep answers precise, with examples and tradeoffs.
### A) Testing & QA
1. In a project that includes **data connection management**, **user management**, and **permission management**, what are the **main testing risk areas** for each module?
2. Scenario: **WeChat scan-to-pay** (QR code payment). How would you **design test cases**?
### B) Python fundamentals
3. What are the three most basic characteristics of **object-oriented programming**?
4. What are **shallow copy** and **deep copy**?
5. Differences between **list** and **tuple**?
6. Key characteristics of a **dict**?
7. What is a **decorator** and why use it?
8. Difference between `__init__` and `__new__`?
9. What is a **generator**?
10. What is an **iterator** used for?
11. What is `self`?
12. What is **serialization/deserialization**?
13. Can Python have **memory leaks**? How to avoid them?
### C) Data structures & algorithms (conceptual)
14. What is a **linked list**?
15. What sorting algorithms do you know? Which is “fast”?
16. Why is quicksort’s **average** time complexity \(O(n\log n)\)?
17. What are the characteristics of **stack** and **queue**? When to use each?
18. What is a **binary tree**? What traversal orders exist?
19. What is a **red-black tree**?
### D) Database & web/OS
20. What is a **database index**?
21. Why can indexes speed up queries?
22. What is a **B+ tree** (why used for indexes)?
23. What is **ACID** in transactions?
24. What types of **JOIN** exist?
25. When a phone opens a webpage and content loads, what key technical steps happen?
26. Concepts of **process** vs **thread**; key differences?
Quick Answer: This multi-part prompt evaluates core software engineering competencies including Python fundamentals (OOP, object/model behavior, iterators/generators, decorators, serialization), data structures and algorithms (lists, trees, sorting and complexity), databases and web/OS concepts (indexes, B+ trees, ACID, joins, process vs thread, page-load flow), and testing/QA risk analysis for modules like data connections, user management and payment flows. It is commonly asked within the Software Engineering Fundamentals domain to measure both conceptual understanding and practical application, emphasizing trade-off reasoning, system-level thinking and testability awareness rather than implementation details.