T0 Big tech Tencent Rounds 1-3
Tencent TEG AI Infra first, second, and third rounds
Real Tencent AI Infra first-, second-, and third-round interview questions covering operator optimization and related topics
Operator optimization
First round
Project experience
- Introduce project-related experience
Databases
- How aggregate functions and GROUP BY are implemented under the hood
- How JOIN is implemented and how to optimize it (index optimization, hash-table optimization)
- In a hash JOIN, if one side is much larger than the other, how do you optimize
- Role of the database optimizer and how it works
- How EXPLAIN executes
- Design and implementation of the Buffer Pool
- Dirty-page management and how to avoid data loss (redo log)
- Weaknesses of LRU (prefetch failure, cache pollution) and improvements
- How concurrent B+ trees are implemented
- Volcano model vs other execution models (materialization model)
- When row store vs column store fits
- Basics of transactions and MVCC
- Design ideas for growing a single-node database into a distributed one (sharding, metadata management, operator execution)
- Difference between hash sharding and range sharding
- High-availability options for metadata nodes (primary–replica replication, distributed consensus protocols)
- How to guarantee strong consistency in MySQL primary–replica replication
- Execution plan for
SELECT * FROM table(Project projection operator + TableScan full-table-scan operator) - Which extra operators you need in a distributed setting for cross-node queries
- Designing a distributed execution plan with WHERE and GROUP BY COUNT
Operating systems
- Linux boot process
- How the interrupt-handling module works
- How the CPU handles multiple concurrent interrupts
- Difference between processes and threads (including user-space threads)
- How user-space threads are scheduled, and possible problems
- Switching from user space to kernel space
Coding
- Implement an in-memory file system (a trie variant)
Second round
Project experience
- Introduce project division of labor and what you owned
- Walk through a full SQL query execution path based on MiniOb
- Which steps in the query path hurt performance most
- Did the project include an optimizer design
- Relationship between the volcano model and the pipeline model
- Optimization directions that break current execution-model bottlenecks (CRTP to cut virtual-call overhead, materialization model returning data in batches)
- Pros and cons of the OceanBase project
- Introduce the xv6 project and what you gained from it
Coding
- Fast/slow pointers to find the middle of a linked list + reverse a linked list
Third round
Project experience
- Introduce which parts of the resume projects you owned and how work was split
- How you handle disagreements in team collaboration
Coding
- Convert uppercase letters in a string to lowercase and sort in lexicographic order (no library functions)