Backend Development 20 min read

Meituan Spring Hiring Overview and Java Backend Interview Q&A

This article discusses Meituan's spring recruitment numbers, then provides detailed Java backend interview questions and answers covering Spring MVC vs Spring Boot, MySQL MVCC, Redis Zset implementation, message queue reliability, HashMap internals, and thread pool usage, offering practical insights for candidates.

IT Services Circle
IT Services Circle
IT Services Circle
Meituan Spring Hiring Overview and Java Backend Interview Q&A

This week major internet companies have launched spring recruitment, with Meituan announcing a total of 5,000 positions for 2026 interns and 2025 graduates.

Meituan's internship conversion rate is reported to be as high as 70%, meaning 7 out of 10 interns successfully become full-time employees.

Meituan First Interview

What is the difference between SpringBoot and SpringMVC?

Spring MVC is a framework focused on the web layer, while Spring Boot simplifies Spring application development by providing auto‑configuration and convention‑over‑configuration, often integrating Spring MVC for handling web requests.

Spring MVC is a module of the Spring framework dedicated to building MVC‑based web applications, routing requests to controllers and returning responses.

Spring Boot builds on Spring to reduce configuration work through auto‑configuration and defaults, enabling rapid project setup.

Why doesn’t MySQL use B‑Tree and Red‑Black Tree?

B+Tree vs B‑Tree: B+Tree stores data only in leaf nodes, resulting in smaller nodes and fewer I/O operations; leaf nodes are linked for efficient range queries.

B+Tree vs Red‑Black Tree: B+Tree’s fan‑out (d) is typically >100, giving a height of 3‑4 levels even for millions of rows, whereas a binary red‑black tree has height O(log N) with more I/O.

B+Tree vs Hash: Hash tables provide O(1) equality lookups but cannot handle range queries, making B+Tree indexes more versatile.

What is the underlying implementation of Redis Zset?

Zset uses either a compressed list or a skiplist as its internal data structure.

If the number of elements is < 128 and each element < 64 bytes, Redis stores the Zset as a compressed list.

Otherwise, Redis uses a skiplist.

Since Redis 7.0, the compressed list implementation has been replaced by the listpack data structure.

Follow‑up: Why use a skiplist?

Linked lists require O(N) time for searches, while a skiplist adds multiple layers of ordered links, reducing search complexity to O(log N). The skiplist’s random level generation ensures higher layers are sparser.

Example: a level‑3 skiplist has head pointers L0‑L2; searching for element 4 can jump from L2 to node 3, then traverse forward, requiring only two lookups instead of four.

Follow‑up: Is a skiplist always used?

When Zset elements are small, Redis uses a compressed list; only larger Zsets switch to a skiplist. The Zset structure actually contains both a skiplist and a hash table to support efficient range and point queries.

typedef struct zset{
dict *dict;
zskiplist *zsl;
} zset;

During inserts or updates, both the skiplist and hash table are updated to keep data consistent.

What is the concrete implementation principle of MySQL MVCC?

MVCC allows multiple transactions to read the same row without blocking by providing each transaction with a snapshot (Read View) of the data at the transaction’s start.

Read View contains four fields: m_ids (list of active transaction IDs), min_trx_id (smallest active ID), max_trx_id (next transaction ID to be assigned), and creator_trx_id (ID of the transaction that created the view).

In InnoDB, each clustered index record stores hidden columns trx_id (the transaction that last modified the row) and roll_pointer (pointer to the undo log record of the previous version).

When a transaction reads a row, visibility is determined as follows:

If the row’s trx_id < min_trx_id , the version is committed before the view and is visible.

If trx_id ≥ max_trx_id , the version was created after the view and is invisible.

If trx_id is between min_trx_id and max_trx_id , the transaction checks whether trx_id is in m_ids ; if it is, the row is still being modified by an active transaction and is invisible, otherwise it is visible.

This version‑chain mechanism is the essence of MVCC.

What is the reliability solution for message queues?

Message reliability requires guaranteeing that producers, the middleware, and consumers all avoid data loss.

Production stage: The producer must handle acknowledgments and retry on failure.

Storage stage: Systems like Kafka replicate messages across multiple nodes.

Consumption stage: Consumers acknowledge only after successful processing.

How do you choose a message queue?

Comparison of ActiveMQ, RabbitMQ, RocketMQ, and Kafka across features such as throughput, latency, availability, duplication, ordering, topic support, message replay, and management UI.

Selection depends on business scenarios: high‑throughput use cases favor Kafka or RocketMQ; large numbers of topics may lead to choosing RabbitMQ; financial systems prioritize stability and security, again favoring Kafka or RocketMQ.

Why use MQ delayed double‑delete to ensure MySQL‑Redis consistency?

When updating MySQL, the cache is first deleted, then a delayed MQ message triggers a second deletion after a short interval, ensuring that any stale data in Redis is removed before subsequent reads, preventing cache‑penetration‑induced inconsistencies and reducing MySQL load.

What is the implementation principle of HashMap?

Before JDK 1.8, HashMap used an array of buckets with linked lists for collisions. In JDK 1.8, when a bucket’s list exceeds 8 entries, it is transformed into a red‑black tree; if the tree size falls below 6, it reverts to a linked list.

What is the usage of thread pools?

A thread pool reduces the overhead of creating and destroying threads. It consists of core threads, a maximum pool size, a work queue, and a rejection policy.

Tasks are submitted; if core threads are not full, a new thread is created. Otherwise, the task is queued; if the queue is full, new threads are created up to the maximum. When the maximum is reached, a rejection handler is invoked.

The ThreadPoolExecutor constructor takes seven parameters: corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, and handler.

Common rejection policies include CallerRunsPolicy, AbortPolicy, DiscardPolicy, DiscardOldestPolicy, or a custom implementation.

backendJavaRedisSpringthreadpoolMySQLInterview
IT Services Circle
Written by

IT Services Circle

Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.