์• ์ •์ฝ”๋”ฉ ๐Ÿ’ป
242. Valid Anagram

https://leetcode.com/problems/valid-anagram/ Valid Anagram - LeetCode Can you solve this real interview question? Valid Anagram - Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using leetcode.com Given two strings s and t, return true if t is an anagram ..

217. Contains Duplicate

https://neetcode.io/roadmap NeetCode.io neetcode.io 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. class Solution(object): def containsDuplicate(self, nums): setCollection = set() for num in nums: if num in setCollection: return True setCollection.add(num) return False not(len(nums)==len(set(nums)))