As reported: Mastercard Software Engineer 2 interview (June 2026), Tech SME round: find the first non-repeating character in a list using streams — e.g.
[a, f, a, w, g, f]→w.
Given a list of characters chars, return the first character (in list order) that occurs exactly once. If every character repeats, return an empty string "". In Java, solve it with the Streams API.
Example 1
chars = ["a","f","a","w","g","f"]
Output: "w"
a and f appear twice; w is the first that appears once (g also does, but later).
Example 2
chars = ["x","x"]
Output: ""
Constraints: 1 ≤ chars.length ≤ 10^5; each element is a single printable ASCII character; comparison is case-sensitive.
Code runner format: one JSON line: chars (a list of one-character strings). Implement firstNonRepeating(chars) returning a one-character string or "".