해외취업 (12) 썸네일형 리스트형 캐나다에 살면 좋은 점 4가지 워킹홀리데이 프로그램을 통해서 캐나다에 입국하고 여기서 산 지가 어느새 2년이 되어간다. (항상 느끼는 거지만 시간은 정말 쏜살같다😢) 그럼 오늘은 2년 동안 캐나다에서 느낀 좋은 점들을 정리해보려 한다. 1. 미국 주식을 쉽게 사고팔 수 있다. 취업을 하고 나서 자연스럽게 재테크에 관심을 가지게 되었다. 퀘스트레이드라는 브로커리지에서 주식 계좌를 오픈하고 주식을 시작한 게 2019년 말 정도니까 주식 거래를 한지 거의 1년 정도 되었다. 계좌를 오픈하고 놀랐던 게 계좌 안에 캐나다 달러와 미국 달러가 계좌에 따로 표기가 되어있던 점이다. 캐나다 주식을 사면 캐나다 달러를 차감하고 미국 주식을 사면 미국 달러를 차감하는데 만약 미국 달러가 없으면 캐나다 달러를 자동으로 환전해서 (환전 수수료는 보통 2%.. 139. Word Break 풀이 leetcode.com/problems/word-break/ Word Break - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution: def wordBreak(self, s: str, wordDict: List[str]) -> bool: if not s or not wordDict : return False words = set(wordDict) n = len(s) dp = [False]*(n+1) dp[0] = True for end .. 5. Longest Palindromic Substring 풀이 leetcode.com/problems/longest-palindromic-substring/ Longest Palindromic Substring - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 : 가장 긴 palindromic 한 문자열을 리턴하는 것. 풀이 : 첫 번째는 인덱스를 하나하나 늘려가면서 왼쪽과 오른쪽으로 expanding 해 나가는 방법이 있다. 이때 주의해야 할 점은 palindrome의 길이가 홀수인지 짝수인지 알 수 없기 때문에 두.. 388. Longest Absolute File Path leetcode.com/problems/longest-absolute-file-path/ Longest Absolute File Path - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution: def lengthLongestPath(self, input: str) -> int: tokens = input.split('\n') if not tokens : return 0 d = collections.defaultdict(int) output.. 41. First Missing Positive leetcode.com/problems/first-missing-positive/ First Missing Positive - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution: def firstMissingPositive(self, nums: List[int]) -> int: if 1 not in nums : return 1 n = len(nums) for i in range(n) : if nums[i] n : nums[i] = 1 fo.. 55. Jump Game leetcode.com/problems/jump-game/ Jump Game - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution: def canJump(self, nums: List[int]) -> bool: n = len(nums) i = 0 farthest = nums[0] while i < n and i = n-1 207. Course Schedule leetcode.com/problems/course-schedule/ Course Schedule - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com import collections class Solution: def canFinish(self, numCourses: int, prerequisites: List[List[int]]) -> bool: indegrees = [0]*numCourses graph = defaultdict(list) for u, v in.. 41. First Missing Positive leetcode.com/problems/first-missing-positive/ First Missing Positive - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution: def firstMissingPositive(self, nums: List[int]) -> int: if 1 not in nums : return 1 n = len(nums) for i in range(n) : if nums[i] n : nums[i] = 1 fo.. 이전 1 2 다음