Jun 24 LeetCode #1 Two Sum

class Solution:
def twoSum(self, nums: List[int], target: int) -> List[int]:
for i in range(len(nums)):
for j in range(i + 1, len(nums)):
if nums[i] + nums[j] == target:
return [i, j]
https://towardsdatascience.com/big-o-d13a8b1068c8

--

--

--

Interested in Philo Film Reading | HK to SF | HongKongers | SAVEHONG12YOUTHS | Free Hong Kong | A programming beginner | An enthusiast to teach Computer Science

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

BEST EMBEDDED SYSTEM TRAINING CENTER IN CHENNAI

BEST EMBEDDED SYSTEM TRAINING INSTITUTE IN CHENNAI

Dagger & Android Thoughts

Django — 4 steps with Mathfilters

Assembling the Robot in Real Life

iOS Vision And Highlighting Text With Core ML

15+ Best places to learn WordPress and become a pro!

so you want to be a software engineer… wait, why?

Slack Channel integration with iOS App using chat Bot

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
pika

pika

Interested in Philo Film Reading | HK to SF | HongKongers | SAVEHONG12YOUTHS | Free Hong Kong | A programming beginner | An enthusiast to teach Computer Science

More from Medium

1217. Minimum Cost to Move Chips to The Same Position(easy)

LeetCode 104. Maximum Depth of Binary Tree

Minimum Moves to Reach Target Score

Leetcode Q176. Second Highest Salary (Q169)