Company: Snowflake
Difficulty: medium
Suspicious Activity From Logs Problem Description Application logs provide valuable insights into user interactions and can help detect suspicious activities. You are given a log file represented as a string array, where each entry records a money transfer in the following format: "sender_user_id recipient_user_id amount". Each entry consists of: sender_user_id: The user initiating the transfer. recipient_user_id: The user receiving the transfer. amount: The transferred amount. The sender_user_id, recipient_user_id, and amount are numeric (0-9), up to 9 digits long, and cannot start with zero. The log entries are provided in no particular order. Write a function that identifies suspicious users—users who appear in at least threshold number of log entries, whether as a sender or a recipient. Return an array of user IDs that meet the threshold condition, sorted in ascending numerical order. Examples Example 1: Input: logs = ["88 99 200", "99 32 100", "12 12 15"], threshold = 2 Output: ["