Last Updated: August 2026
Given a 2D array of user IDs, where each inner list represents a friend group and contains the IDs of users in that group, find the number of friend groups each user appears in.
user_ids is a 2D array of user IDs.user_ids array is a list of integers representing the user IDs.user_ids array can have any number of rows and columns.user_ids array can contain duplicate user IDs.Dict[int, int]) where the keys are the user IDs and the values are the count of friends for each user.See the full interview round by round, with questions for each stage.