coupang logo
Coupang· Staff

Coupang Interview Experience | Staff | AUG 2026

Posted
7 Aug 2026
107 reads

Summary

I interviewed for a Staff role at Coupang in August 2026, where I was asked to convert an undirected graph into a directed one to minimize the number of connected nodes.

How it went

Don't remember the exact Question, but the question is goes as follows

Graph Problem

There are n warehouses, and two list is provided from and to Edges which are birectional Edge, the goal is to convert the bidirectional into directed graph, so that the number of connected nodes is as less as possible you need to do it optimally.

1 - 2 - 3

you need to connect 1 -> 2 - > 3 here the number of unconnected node is 1 but if you connect 1 -> 2 <- 3 then you get 2, which is wrong.

so the goal is to convert the un-directed graph to a directed edge optimally.

solution explored in interview :

  1. first approch tried connecting the edge direction where the indegree is 0 first lets say we get node from and to as 5,4 then if the indegree of 5 is 0 then make an edge from 4 - > 5

  2. compute number of connected components using DUS, then check if there is cycle then all nodes are connected else, only one node is left and add +1 to the result.

if someone knows the exact leetcode question please tag.

Questions asked (1)

  1. 01

    Minimize Connected Nodes by Directing Edges

    Data Structures & Algorithms

    Given n warehouses and two lists from and to representing bidirectional edges between them, convert the undirected graph into a directed graph such that the number of connected (reachable) nodes is as small as possible. The conversion must be done optimally. Example: for a chain 1 - 2 - 3, directing the edges as 1 -> 2 -> 3 leaves only node 1 unconnected (count = 1), whereas directing as 1 -> 2 <- 3 leaves two unconnected nodes (count = 2), which is not optimal. The task is to assign a direction to each edge to minimize the number of nodes that are not reachable from any source.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Coupang recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!