Skip to content

Instantly share code, notes, and snippets.

View Yosuamuliawan19's full-sized avatar
📈
Gradient Descending

Yosua Muliawan Yosuamuliawan19

📈
Gradient Descending
  • National University of Singapore / Software Engineer
  • Singapore
View GitHub Profile
@Yosuamuliawan19
Yosuamuliawan19 / solution.py
Created March 21, 2022 16:42
[Leetcode] Two Sum - Python
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)):
a = nums[i] + nums[j]
if (a == target):
return [i, j]
return [0,0]
@Yosuamuliawan19
Yosuamuliawan19 / conda.sh
Created October 23, 2021 10:19
[Conda cheatsheet] #python #conda #shell
# export and import envs
conda env export > environment.yml
conda env create -f environment.yml