Real Interview Questions for the Software Engineer at Mercado Libre
NewPractice MCQs
Answers count toward the Software Engineer and overall leaderboards; your latest answer to each question is the one that counts.
MCQ-1A product listing page serves 30,000 requests per second at peak, and each render runs a synchronous query on the primary PostgreSQL database that takes 8 ms. A promotion pushes traffic to 90,000 requests per second, and the 500-connection pool saturates. Prices change several times an hour, and the business requires a displayed price to be at most 60 seconds old. Which change absorbs the spike while meeting that freshness rule?
Answer to see the discussion.
MCQ-2Your order service calls inventory synchronously, and its p99 is 220 ms against a 250 ms budget. A teammate wants to replace the call with a Kafka topic that inventory consumes, and your three-person team has no on-call coverage for a broker. You both think your design is right. Which first step settles the disagreement?
Answer to see the discussion.
MCQ-3A checkout team changes how fees are rounded for orders above 1,000 units. The change ships after one manual QA pass on staging, and a seller reports a one-cent error in production two weeks later. The team wants the check that catches this class of defect earliest, before the change is merged. Which change does that?
Answer to see the discussion.
MCQ-4A payments cutover slipped three weeks. The script ran at 2 a.m. with no dry run, and it stopped halfway, leaving two tables out of sync for six hours. The lead wants the retro to record what went wrong, and two engineers say the on-call person's name should be in it. What should the retrospective record as the cause?
Answer to see the discussion.
MCQ-5A Mercado Libre checkout service caches seller lookups in an LRU cache with capacity 3. The calls run in this order: put(1,A), put(2,B), put(3,C), get(1), put(4,D). Which key does the cache evict when put(4,D) arrives?
Answer to see the discussion.
MCQ-6Twelve API instances each open a new PostgreSQL connection for every request, run a 4 ms query, then close it, paying about 25 ms of setup each time. At peak each instance needs at most 4 connections at once, and the database's max_connections is 200. Which per-instance pool cap should the team set?
Answer to see the discussion.
MCQ-7A Node.js API issues JWTs signed with HS256 and a shared secret, with payload `{sub, role, exp}` and `exp` set 30 days out. Mobile clients send the token in the Authorization header. An internal gateway reads `role` with `jwt.decode`, which skips signature checks, and a tester edits `role` to admin in the base64 payload segment and gets through. Which change stops the forged role?
Answer to see the discussion.
MCQ-8An orders table takes 120,000 writes per second at peak, and one PostgreSQL primary sustains about 30,000. Seller dashboards read all of one seller's orders in a single query, and losing one node must not stop writes to the other shards. Which layout meets both requirements?
Answer to see the discussion.
MCQ-9A ride-matching service keeps 200,000 online drivers in an in-memory index, and each driver sends a location every 4 seconds, so about 50,000 updates per second hit the index. A rider's request must find every driver within 2 km, and the match p99 budget is 50 ms. Each update moves one driver to a new cell, and a query reads every cell its search covers. Which indexing choice keeps both the update path and the query inside budget?
Answer to see the discussion.
MCQ-10A Mercado Libre payments service was down for 40 minutes after a config push set the database connection pool to 400, while the database allows 200. The draft postmortem names the engineer who pushed the change as root cause. Which change to the postmortem best meets the blameless standard and prevents recurrence?
Answer to see the discussion.
MCQ-11A serializer logged the preorder traversal 3, 9, 20, 15, 7 and the inorder traversal 9, 3, 15, 20, 7 of one binary tree whose values are all distinct. The rebuild takes the first preorder value as the root and splits the inorder list at that value. What is the postorder traversal of the rebuilt tree?
Answer to see the discussion.
MCQ-12A binary tree has root 3, with left child 5 and right child 1. Node 5 has children 6 and 2, node 2 has children 7 and 4, and node 1 has children 0 and 8. A single postorder recursion returns a node as soon as it finds p or q, and returns the node that has both targets below it. For p = 7 and q = 4, which node does the recursion return?
Answer to see the discussion.
MCQ-13A Mercado Libre checkout reserves stock in two statements per request: it reads the stock value, checks that it covers the quantity, then writes stock = the value it read minus the quantity. The item has 10 units. Cart A wants 6 and cart B wants 3. Both reads run before either write, under READ COMMITTED with no lock or version check. A's write commits first, then B's. What stock value and outcome result?
Answer to see the discussion.
MCQ-14A Mercado Libre pricing service tracks the highest bid among recent bids in a FIFO queue, and max() must run in O(1) amortized time using a monotonic deque kept beside the queue. Bids are enqueued in the order 5, 3, 8, 2, then one dequeue removes the oldest bid. What does max() return, and what does the deque hold front to back?
Answer to see the discussion.
MCQ-15A React 18 chat list renders each message with key={index}, and every row holds an uncontrolled input whose draft text lives only in the DOM. The user is typing in the row at index 0 when a new message arrives and React prepends it, so every existing message shifts down one position. What does the user see for the draft?
Answer to see the discussion.
MCQ-16A five-node Raft cluster is split by a network partition into {A, B} and {C, D, E}. Node A times out in term 7, votes for itself and sends `RequestVote`. Only B receives the request and grants its vote, and C, D and E never see it. What does A do next?
Answer to see the discussion.
MCQ-17An HTTP ingestion service accepts events at 5,000 per second, but its Go worker writes them to a database at only 1,200 per second. The channel between them holds 10,000 events of about 2 KB each inside a 512 MB container, and the producers are mobile clients that retry any request they receive a 503 for. Which mechanism absorbs the 3,800-per-second surplus?
Answer to see the discussion.
MCQ-18A service stores 1,000,000 distinct sorted IDs that were rotated at an unknown pivot, so in miniature the array is `[4,5,6,7,0,1,2]`, and each lookup must finish in O(log n) with no pre-scan. The loop has `low=0`, `high=6`, `mid=3` (value 7), and the target is 1. Which indices does the loop search next?
Answer to see the discussion.
MCQ-19A service stores 1,000,000 distinct IDs that were rotated at an unknown pivot, and each lookup of the minimum must run in O(log n). In a miniature copy, `nums` is [12,15,18,2,5,6,8,10], and the search loop has low=0, high=7, mid=3, so `nums[mid]` is 2. Which indices does the loop search next?
Answer to see the discussion.
MCQ-20You designed a webhook dispatcher that runs 20 shared delivery workers, with each call timing out after 10 s. One merchant's endpoint stalls, so every call to it holds a worker until the timeout, while all other merchants together need 13 workers at peak. Which per-merchant in-flight cap is the largest that still leaves those 13 workers free during the stall?
Answer to see the discussion.
Curated: · Written: · Reviewed: