분류 전체보기 (438) 썸네일형 리스트형 [이분탐색] 릿코드 Medium 74 'Search a 2D Matrix' (Python) https://leetcode.com/problems/search-a-2d-matrix/ Search a 2D Matrix - 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 1. 각 행에 target 값이 있으면 true class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: for i in matrix: if target in i: return True retur.. [이분탐색] 릿코드 Medium 33 'Search in Rotated Sorted Array' (Python) https://leetcode.com/problems/search-in-rotated-sorted-array/ Search in Rotated Sorted Array - 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 1. nums에서 target의 인덱스 값을 찾아라 2. target 값이 없으면 -1 class Solution: def search(self, nums: List[int], target: int) -> int: if target in nums: .. [이분탐색] 릿코드 Medium 34 'Find First and Last Position of Element in Sorted Array' (Python) https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ Find First and Last Position of Element in Sorted Array - 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 1. 파이썬의 bisect 라이브러리를 활용 2. target이 nums에 있다면 정답을 반환하고 없으면 [-1,-1]을 반환함 from bisect impor.. [에세이][독후감] “내가 확실히 아는 것들” - 오프라 윈프리 2021.07.25 ~ 2021.07.25 Score ❤❤ 집 앞 북카페 가서 책을 고르다가 제목에 끌려 읽게 되었다. 오프라 윈프리는 미국 방송인이다. 이름은 많이 들어봤는데 어디에 나왔는지는 잘 몰라서 인터넷에서 찾아봤다. [1장. 기쁨] "자신이 별 네 개나 다섯 개를 줄 만한 즐거움을 누리고 있다는 것을 자각하거나 스스로 그런 순간을 만들어내다 보면 복이 저절로 따라오게 마련이다." 내 행복은 스스로가 만들어내는 것인 것 같다. 요즘 취업 준비하느라 약간 힘든데 힘내서 긍정적으로 생각해야겠다. 미래도 중요하지만 지금 이 순간순간을 소중히 보내고 즐겁게 사는 것이 중요한 것 같다. "삶을 황홀한 보물로 가득 채우고 싶다면 그 보물을 감상할 잠시의 시간만 내면 된다." 나만의 소소한 행복을 찾고 잠깐.. [해시] 릿코드 Medium 567 'Permutation in String' (Python) https://leetcode.com/problems/permutation-in-string/ Permutation in String - 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 순서 상관없이 s2 내에 연속해서 s1의 값이 들어있으면 됨 그 값이 몇개 있는지만 확인하면 되므로 Counter 라이브러리 이용 from collections import Counter class Solution: def checkInclusion(self, s1: str, s2.. [동적계획법] 릿코드 Medium 198 'House Robber' (Python) https://leetcode.com/problems/house-robber/ House Robber - 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 1. 더하는 숫자들이 이웃하지만 않으면 됨 2. 바로 직전의 돈과 두번째 전의 돈+현재 돈 중 큰 값을 구하면 됨 3. 집이 하나만 있을 수 있음 class Solution: def rob(self, nums: List[int]) -> int: answer = [] if len(nums)==1: return nu.. [동적계획법] 릿코드 Easy 70 'Climbing Stairs' (Python) https://leetcode.com/problems/climbing-stairs/ Climbing Stairs - 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 climbStairs(self, n: int) -> int: answer = [] answer.append(1) answer.append(2) for i in range(2,n): answer.appen.. IntelliJ - Github 연동 1. IntelliJ에서 Ctrl+Shift+A 2. Repository name 설정하고, Add account 눌러서 본인 Github 계정과 연동 3. gitignore 설정 4. IntelliJ 재시작 5. 프로젝트 선택 후 Alt + Insert >.gitignore File 열기 6. gitignore에 코드 등록 .gradle .idea 7. Git에 Commit&Push Ctrl + K >> Ctrl + Shift + K 안되면 아래 글 참고 https://goddaehee.tistory.com/249 [IntelliJ] IntelliJ + Github 연동하기 [IntelliJ] IntelliJ + Github 연동하기 안녕하세요. 갓대희 입니다. 이번 포스팅은 [ IntelliJ 로컬 .. 이전 1 ··· 36 37 38 39 40 41 42 ··· 55 다음