<jupyter_start><jupyter_text>2021년 1월 21일 목요일 leetCode - Remove Duplicates from Sorted Array II (Python) 문제 : https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ 블로그 : https://somjang.tistory.com/entry/leetCode-80-Remove-Duplicates-from-Sorted-Array-II-Python  첫번째 시도<jupyter_code>class Solution:
    def removeDuplicates(self, nums: List[int]) -> int:
        index = 0
        
        for num in nums:
            if index < 2 or num != nums[index-2]:
                nums[index] = num
                index = index + 1
                
        return index<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10855263157894737, 'fraction_numerical': 0.02138157894736842, 'mean_word_length': 2.3833333333333333, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '139309', 'license': 'MIT', 'n_tokens_mistral': 231, 'n_tokens_neox': 232, 'n_words': 43, 'path': 'DAY 201 ~ 300/DAY299_[leetCode] Remove Duplicates from Sorted Array II (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '608'}