This question evaluates the ability to parse and sanitize input strings, implement multi-key sorting with numeric and lexicographic tie-breakers, and analyze time and space complexity while correctly handling malformed records.
You are given a list of strings, each formatted as "product,price,attention". Parse the list into records and return the product names sorted to prioritize low price and high attention: sort by price ascending, then by attention descending, and finally by product name lexicographically to break any remaining ties. Assume price and attention are integers. Ignore malformed entries (missing fields or non-numeric price/attention). Describe your approach, data structures used, time and space complexity, and provide working code.