Junior Software Interview Questions

12,103 junior software interview questions shared by candidates

We have some input that describes the steps of a workflow. The input consists of pairs of steps, each one indicating that one step must be completed before another. For example, in sample input 1, "clean" must occur before "build" and "build" must occur before "link". The input can occur in any order. We want to write a function to separate a given workflow's steps into multiple stages in such a way that all the steps in each individual stage can run at the same time. The function should return a list of lists. In which each list represents one stage. Each step should run in the earliest possible stage. Sample Input 1: precursor_steps = [ ["clean", "build"], ["metadata", "binary"], ["build", "link"], ["link","binary"], ["clean", "metadata"], ["build","resources"] ] Sample Output: [ ["clean"], ["build", "metadata"], ["resources","link"], ["binary"] ]
avatar

Junior Software Engineer

Interviewed at Intuit

4.2
Dec 5, 2017

We have some input that describes the steps of a workflow. The input consists of pairs of steps, each one indicating that one step must be completed before another. For example, in sample input 1, "clean" must occur before "build" and "build" must occur before "link". The input can occur in any order. We want to write a function to separate a given workflow's steps into multiple stages in such a way that all the steps in each individual stage can run at the same time. The function should return a list of lists. In which each list represents one stage. Each step should run in the earliest possible stage. Sample Input 1: precursor_steps = [ ["clean", "build"], ["metadata", "binary"], ["build", "link"], ["link","binary"], ["clean", "metadata"], ["build","resources"] ] Sample Output: [ ["clean"], ["build", "metadata"], ["resources","link"], ["binary"] ]

Viewing 861 - 870 interview questions

Glassdoor has 12,103 interview questions and reports from Junior software interviews. Prepare for your interview. Get hired. Love your job.