Engineer Internship Interview Questions

24,376 engineer internship interview questions shared by candidates

There is a tree (all edged given), target nodes for a person starting from root node (list of vertices given). What is the minimum distance to visit all target nodes and return back to the root node. Follow-up: There are 2 friends with two independent target nodes. What is the minimum distance travelled by both friends ( distance of friend 1 + distance of friend 2 ) to visit their target nodes, given that at any point of time the maximum distance can be length of 1 edge ( if a person is in node x, the other person can be in the same node, its parent or in one of its child) Additional follow-up: Same as the follow-up mentioned but the distance should be at max k ( integer k given )
avatar

Software Engineer(Internship)

Interviewed at Databricks

4
Dec 17, 2024

There is a tree (all edged given), target nodes for a person starting from root node (list of vertices given). What is the minimum distance to visit all target nodes and return back to the root node. Follow-up: There are 2 friends with two independent target nodes. What is the minimum distance travelled by both friends ( distance of friend 1 + distance of friend 2 ) to visit their target nodes, given that at any point of time the maximum distance can be length of 1 edge ( if a person is in node x, the other person can be in the same node, its parent or in one of its child) Additional follow-up: Same as the follow-up mentioned but the distance should be at max k ( integer k given )

Viewing 751 - 760 interview questions

Glassdoor has 24,376 interview questions and reports from Engineer internship interviews. Prepare for your interview. Get hired. Love your job.