Associate Software Engineer Developer Interview Questions

23,382 associate software engineer developer interview questions shared by candidates

Find a cycle in an array: You are given an integer array of size N. Every element of the array is greater than or equal to 0. Starting from arr[startIndex], follow each element to the index it points to. Continue to do this until you find a cycle. Return the length of the cycle. If no cycle is found return -1 Examples: countLengthOfCycle([1, 0], 1) == 2 , countLengthOfCycle([1, 2, 0], 0) == 3
avatar

Software Engineer Associate

Interviewed at Goldman Sachs

3.7
Feb 22, 2025

Find a cycle in an array: You are given an integer array of size N. Every element of the array is greater than or equal to 0. Starting from arr[startIndex], follow each element to the index it points to. Continue to do this until you find a cycle. Return the length of the cycle. If no cycle is found return -1 Examples: countLengthOfCycle([1, 0], 1) == 2 , countLengthOfCycle([1, 2, 0], 0) == 3

Viewing 121 - 130 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 23,382 interview questions and reports from Associate software engineer developer interviews. Prepare for your interview. Get hired. Love your job.