Yugabyte | SDE 2 | Remote | Reject
- Result
- Rejected
- Location
- Remote
- Posted
- 31 May 2024
Summary
I had two coding rounds for the SDE 2 role at Yugabyte and unfortunately received a rejection after the second round.
How it went
I had an initial call with the recruiter, which was followed by two coding rounds. Each round was scheduled for an hour, providing approximately 50-55 minutes for coding. Despite completing both rounds, I received a rejection notification after the second round.
Questions asked (2)
- 01
Reachable Nodes In Subdivided Graph
Data Structures & Algorithms · Hard
Open the problemYou are given an undirected graph with
nnodes, a list ofedges, and an integermaxMoves. Each edgeedges[i] = [ui, vi, cnti]indicates there is an undirected edge betweenuiandviwithcntinew nodes inserted on that edge.
Specifically, if an edge betweenuiandvihascntinew nodes, it means it's replaced bycnti + 1new edges andcntinew nodes. The original edge(ui, vi)is effectively replaced by a path of lengthcnti + 1.
The task is to return the number of nodes that are reachable from node 0 withinmaxMovesmoves. A move consists of traversing one edge (whether original or subdivided). - 02
Shortest Path with Alternating Colors
Data Structures & Algorithms · Medium
Open the problemYou are given
n, the number of nodes in a directed graph where nodes are labeled from0ton - 1. You are also given two arrays,redEdgesandblueEdges.redEdges[i] = [ai, bi]denotes a directed red edge from nodeaito nodebi, andblueEdges[j] = [uj, vj]denotes a directed blue edge from nodeujto nodevj.
Return an arrayanswerof lengthn, whereanswer[X]is the length of the shortest path from node0to nodeXsuch that the edges in the path alternate in color. If such a path does not exist for a nodeX, setanswer[X]to-1.