본문 바로가기

Leetcode

(10)
[Leetcode] 665. Non-decreasing Array May Leetcode Challenge 2021에서 5월 4일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. leetcode.com/problems/non-decreasing-array/ Non-decreasing 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시간 넘게 썼고...
[Leetcode] 1480. Running Sum of 1d Array 저번 주말은 장인어른 생신도 있고, 처남네가 집에 와있었던터라 공부를 못했다... 뭐... 할 시간이 있었지만, 안했던 것이니 반성하면서 다시 또 월요일을 열어본다. 인터뷰가 머지 않았다고! May Leetcode Challenge 2021 에서 5월 3일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. leetcode.com/problems/running-sum-of-1d-array/ Running Sum of 1d 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..
[Leetcode] 970. Powerful Integers April Leetcode Challenge 2021에서 4월 30일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. leetcode.com/problems/powerful-integers/ Powerful Integers - 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 이 문제를 처음 봤을때는 뭔가 다른 트릭이 필요한가? 라는 생각이 들었는데 그냥 brute-force 로 푸는 방법보다 딱히 더 빠른 알고리즘이 떠오르지 않..
[Leetcode] 34. Find First and Last Position of Element in Sorted Array April Leetcode Challenge 2021에서 4월 29일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. 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 항상 말씀드리지만, ..
[Leetcode] 63. Unique Paths II April Leetcode Challenge 2021에서 4월 28일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. https://leetcode.com/problems/unique-paths-ii/ Unique Paths II - 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 문제를 읽어보면 m X n 그리드가 주어지고 왼쪽 최상단에 로봇이 있다고 한다. 이 로봇은 오른쪽 또는 아래쪽으로만 이동할 수 있다고 한다. 로봇은 ..
[Leetcode] 326. Power of Three April Leetcode Challenge 2021 에서 4월 27일에 (PST) 출시된 문제를 풀어보도록 하겠다. 문제는 아래 링크를 참고하길 바란다. leetcode.com/problems/power-of-three/ Power of Three - 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 주어진 n 이 3의 거듭제곱인지에 대해서 판별하는 문제이다. 문제를 보자마자 3으로 계속 나누어서 1이 나오면 성공이라는 생각이 들었다. 역시나 당연히 follow-..
[Leetcode] 48. Rotate Image 오랜만에 돌아왔습니다. 한두달간 충전했고 다시금 새로 달려보려고 합니다. 인터뷰 일정이 잡혔기 때문에 블로그는 많이 못해도 꾸준히 공부하는게 목표입니다. 오늘은 배열의 위치를 변경하는 문제를 풀어보겠다. April Leetcode Challenge 2021 에서 4월 25일에 (PST) 출시된 문제이다. 문제는 아래 링크를 참고하길 바란다. leetcode.com/problems/rotate-image/ Rotate Image - 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. leet..
[Leetcode] 1721. Swapping Nodes in a Linked List 오늘은 Linked List 내의 특정 노드들을 swap 하는 문제를 풀어보겠다. March Leetcode Challenge 2021 에서 3월 14일 (PST) 에 출시된 문제이다. 문제는 아래 링크를 참고하시면 된다. leetcode.com/problems/swapping-nodes-in-a-linked-list/ Swapping Nodes in a Linked List - 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 문제를 읽어보면 입력으로 Linked..