Taro Logo

Software Developer Interview Experience - Rājkot, India

October 18, 2019
Positive ExperienceNo Offer

Process

I applied through a college or university. The process took one week.

  • First Round: An aptitude test, which I cleared.
  • Second Round: A programming test having three questions of Converging mash.

I have the second-round programs, which are as follows. I was not able to clear that round, but I completed these programs at home. I hope it may help you.

Questions

You are given a maze with N cells. Each cell may have multiple entry points but not more than one exit (i.e., entry/exit points are unidirectional doors like valves). The cells are named with an integer value from 0 to N-1. You need to find the length of the largest cycle in the maze. Return -1 if there are no cycles.

Input format:

  • First line has the number of cells N.
  • Second line has a list of N values of the edge[] array. edge[i] contains the cell number that can be reached from cell 'i' in one step. edge[i] is -1 if the 'i'th cell doesn't have an exit.

Output format: the length of the largest cycle.

Sample input: 23 4 4 1 4 13 8 8 8 0 8 14 9 15 11 -1 10 15 22 22 22 22 22 21.

Sample output: 6.

I have already tried to do this with DFS to find all possible cycles and print the largest cycle size. Please let me know if there is any better solution for the same.

Was this helpful?

Interview Statistics

The following metrics were computed from 1 interview experience for the Juspay Software Developer role in Rājkot, Gujarat.

Success Rate

0%
Pass Rate

Juspay's interview process for their Software Developer roles in Rājkot, Gujarat is extremely selective, failing the vast majority of engineers.

Experience Rating

Positive100%
Neutral0%
Negative0%

Candidates reported having very good feelings for Juspay's Software Developer interview process in Rājkot, Gujarat.