Algorithm/CPP
[C++, LeetCode] Contains Duplicate 벡터에 중복 값 포함되었는지 확인하기
문제: https://leetcode.com/problems/contains-duplicate/ Contains Duplicate - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 앞에서 풀었던 문제(정렬된 벡터에서 중복 제거하기)와 유사해서 금방 풀었다. 🔽풀이 1 class Solution { public: bool containsDuplicate(vector& nums) { int before = nums.size(); sort(nums.begin(), n..