Panda Guru LogoPanda
Guru

Okta | OA | VisageTomeToOkta

Round 1

Questions: Implement a function that takes in a map of VisageTome group memberships, where the keys are group names and the values are lists of memberships, and returns a list of Okta group memberships.

Example: INPUT: group1 -> [(user1(Type USER, name user1), group2 (type GROUP, name group2))] group2 -> [(user2(Type USER, name user2), user3 (type USER, name user3))] OUTPUT: [(user1, group1), (user2, group1), (user3, group1), (user2, group2), (user3, group2)]

g1 |-- g2 |----------u2 |----------u3 |---u1
Candidate's Approach

The candidate implemented a Java function to convert VisageTome group memberships to Okta group memberships. The approach involved:

  • Creating a map to store group memberships.
  • Using a recursive method to traverse the group structure, handling both users and nested groups.
  • Maintaining a set to track visited groups to avoid cycles.

The main method initializes the group memberships and calls the computeOktaMemberships method to generate the final list of Okta memberships.

Interviewer's Feedback

No feedback provided.