Sangjun 개발 블로그
    • 태그
    • algorithm
    • apple
    • aws
    • boto3
    • cron
    • crontab
    • db
    • django
    • docker
    • facebook
    • fcm
    • go
    • google
    • gopacket
    • gui
    • kakao
    • learning
    • leetcode
    • library
    • linux
    • logging
    • mariadb
    • models
    • mssql
    • naver
    • nfs
    • numpy
    • oauth
    • opencv
    • postgredb
    • pytest
    • python
    • sniff
    • sql
    • swagger
    • windows
    • windows10
    • wsl
    Hero Image
    LeetCode Python (Easy)

    1. Two Sum 문제 링크 nums 리스트 속성값 중 두개의 값이 target 값과 동일할때 해당 속성 값의 index 반환 class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: for i, num in enumerate(nums): for j, num2 in enumerate(nums[i+1:]): if i != j+i+1: if target == num+num2: return [i, j+i+1] 2020-11-27 Runtime: 40 ms, faster than 97.02% of Python3 online submissions for Two Sum. Memory Usage: 14.5 MB, less than 89.

    December 1, 2020 Read
    바로가기
    • About
    • Recent Posts
    Contact me:
    • sangjuncha.dev@gmail.com

    Toha Theme Logo Toha
    Copyright 2020. SangjunCha all rights reserved.
    Powered by Hugo Logo