You are given a table recording mutual "like" scores between pairs of users on a social platform. Each row contains two distinct user names a and b, and two non‑negative integers like_a_to_b and like_b_to_a. These represent how much a likes b and how much b likes a, respectively. All user names are unique strings, and no pair appears more than once.
When a user u wants to discover someone new, the platform follows a two‑step recommendation process:
v that u likes the most. That is, across all rows involving u, pick the partner for whom u's outgoing like score is highest. If there are multiple such partners with the same maximum score, select the one with the lexicographically smallest name.v, find the user w that v likes the most (again breaking ties by smallest name). If w is the same as u, the recommendation is empty. Otherwise, w becomes the recommended user.Given the table and a username u, return a list containing the recommended user's name. If no recommendation can be made (because u has no outgoing likes, or the most‑liked user v has no outgoing likes, or the resulting w equals u), return an empty list.
Example 1:
Table:
Row 1: "alice", "bob", like_a_to_b = 10, like_b_to_a = 5
Row 2: "bob", "charlie", like_a_to_b = 8, like_b_to_a = 6
Row 3: "charlie", "alice", like_a_to_b = 1, like_b_to_a = 2
Input: u = "alice"
Output: ["charlie"]
Explanation: Alice's outgoing likes: to Bob (10), to Charlie (2). Max is 10 → Bob. Bob's outgoing likes: to Alice (5), to Charlie (8). Max is 8 → Charlie. Recommended is Charlie.
Example 2:
Table:
Row 1: "alice", "bob", like_a_to_b = 7, like_b_to_a = 9
Row 2: "bob", "charlie", like_a_to_b = 3, like_b_to_a = 4
Input: u = "alice"
Output: []
Explanation: Alice → Bob (max 7). Bob's outgoing likes: to Alice (9), to Charlie (4). Bob's max is to Alice (9). Since the recommendation would be Alice herself, return empty.
Example 3:
Table:
Row 1: "alice", "bob", like_a_to_b = 5, like_b_to_a = 8
Input: u = "david"
Output: []
Explanation: David does not appear in any row, so no outgoing likes → empty.
Constraints:
u is a valid username string, possibly not present in the table.