Skip to main content
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

  1. Introduce project-related experience

Databases

  1. How aggregate functions and GROUP BY are implemented under the hood
  2. How JOIN is implemented and how to optimize it (index optimization, hash-table optimization)
  3. In a hash JOIN, if one side is much larger than the other, how do you optimize
  4. Role of the database optimizer and how it works
  5. How EXPLAIN executes
  6. Design and implementation of the Buffer Pool
  7. Dirty-page management and how to avoid data loss (redo log)
  8. Weaknesses of LRU (prefetch failure, cache pollution) and improvements
  9. How concurrent B+ trees are implemented
  10. Volcano model vs other execution models (materialization model)
  11. When row store vs column store fits
  12. Basics of transactions and MVCC
  13. Design ideas for growing a single-node database into a distributed one (sharding, metadata management, operator execution)
  14. Difference between hash sharding and range sharding
  15. High-availability options for metadata nodes (primary–replica replication, distributed consensus protocols)
  16. How to guarantee strong consistency in MySQL primary–replica replication
  17. Execution plan for SELECT * FROM table (Project projection operator + TableScan full-table-scan operator)
  18. Which extra operators you need in a distributed setting for cross-node queries
  19. Designing a distributed execution plan with WHERE and GROUP BY COUNT

Operating systems

  1. Linux boot process
  2. How the interrupt-handling module works
  3. How the CPU handles multiple concurrent interrupts
  4. Difference between processes and threads (including user-space threads)
  5. How user-space threads are scheduled, and possible problems
  6. Switching from user space to kernel space

Coding

  1. Implement an in-memory file system (a trie variant)

Second round

Project experience

  1. Introduce project division of labor and what you owned
  2. Walk through a full SQL query execution path based on MiniOb
  3. Which steps in the query path hurt performance most
  4. Did the project include an optimizer design
  5. Relationship between the volcano model and the pipeline model
  6. Optimization directions that break current execution-model bottlenecks (CRTP to cut virtual-call overhead, materialization model returning data in batches)
  7. Pros and cons of the OceanBase project
  8. Introduce the xv6 project and what you gained from it

Coding

  1. Fast/slow pointers to find the middle of a linked list + reverse a linked list

Third round

Project experience

  1. Introduce which parts of the resume projects you owned and how work was split
  2. How you handle disagreements in team collaboration

Coding

  1. Convert uppercase letters in a string to lowercase and sort in lexicographic order (no library functions)