• The list approach checks for membership using a linear search, resulting in O(n^2) time complexity for the worst case.
• The set approach uses hash-based membership checks, achieving O(n) time complexity.
when reducing the Big O speeed use sets instead of lists in array problems