Loading problem…
You're building a validation system for an e-commerce cart or form submission. You need to check if a user has duplicate items in their cart or if there are duplicate IDs in a form submission.
Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct.