docs: add populate-notes.mjs to leetcode/AGENTS.md
This commit is contained in:
@@ -45,6 +45,12 @@ Write your approach here.
|
|||||||
#+begin_src python
|
#+begin_src python
|
||||||
class Solution:
|
class Solution:
|
||||||
def containsDuplicate(self, nums: List[int]) -> bool:
|
def containsDuplicate(self, nums: List[int]) -> bool:
|
||||||
|
s = set()
|
||||||
|
for x in nums:
|
||||||
|
if x in s:
|
||||||
|
return True
|
||||||
|
s.add(x)
|
||||||
|
return False
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** TODO C++
|
** TODO C++
|
||||||
|
|||||||
@@ -21,8 +21,15 @@ Source: [[https://neetcode.io/roadmap][neetcode.io/roadmap]]
|
|||||||
Notes: [[file:dsa/arrays-hashing/0217-contains-duplicate.org]]
|
Notes: [[file:dsa/arrays-hashing/0217-contains-duplicate.org]]
|
||||||
** TODO 0242. Valid Anagram :easy:
|
** TODO 0242. Valid Anagram :easy:
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:LEETCODE: [[https://leetcode.com/problems/valid-anagram/][Problem]]
|
:LEETCODE: [[https://lclass Solution:
|
||||||
:CPP: [[https://github.com/neetcode-gh/leetcode/blob/main/cpp/0242-valid-anagram.cpp][Solution]]
|
def containsDuplicate(self, nums: List[int]) -> bool:
|
||||||
|
s = set()
|
||||||
|
for x in nums:
|
||||||
|
if x in s:
|
||||||
|
return True
|
||||||
|
s.add(x)
|
||||||
|
return False
|
||||||
|
.com/neetcode-gh/leetcode/blob/main/cpp/0242-valid-anagram.cpp][Solution]]
|
||||||
:PYTHON: [[https://github.com/neetcode-gh/leetcode/blob/main/python/0242-valid-anagram.py][Solution]]
|
:PYTHON: [[https://github.com/neetcode-gh/leetcode/blob/main/python/0242-valid-anagram.py][Solution]]
|
||||||
:VIDEO: [[https://youtube.com/watch?v=9UtInBqnCgA][Watch]]
|
:VIDEO: [[https://youtube.com/watch?v=9UtInBqnCgA][Watch]]
|
||||||
:END:
|
:END:
|
||||||
|
|||||||
Reference in New Issue
Block a user