This is a virtual interview for campus hiring.
They asked a simple graph question on undirected graphs, specifically trees.
It can be solved using a multisource BFS approach.
You will be given the first 20 minutes to understand the question and come up with an approach.
After explaining your approach, you can start writing code in the editor (for me, it's the HackerRank platform).
I tried to solve it, but it has errors due to some logical mistakes in the code that I am unable to find while reviewing.
After writing the code, you need to execute it with the test cases you were given.
There is a network consisting of ‘n’ nodes. These ‘n’ nodes are connected using ‘n-1’ cables to keep the entire network connected.
N = 6 Edges = [{2,3}, {3,4}, {4,5}, {5,6}, {1,5}]
Unfortunately, one of these nodes is infected by a malicious virus, which modifies the contents stored in a particular node and in all nodes separated by a distance ‘d’ from the corrupted source node. D = 3
You know information about some of the nodes which are corrupted. This is an array of size M. M = 2 Affected Nodes = [1,2]
There is exactly one node where the virus infestation would have taken place. Find all the possible nodes on which the virus infestation might have taken place. Assume the input is such that the answer is always present.
The following metrics were computed from 1 interview experience for the Confluent SDE 1 role in Bengaluru, Karnataka.
Confluent's interview process for their SDE 1 roles in Bengaluru, Karnataka is extremely selective, failing the vast majority of engineers.
Candidates reported having very good feelings for Confluent's SDE 1 interview process in Bengaluru, Karnataka.