컴퓨터공학 & 정보통신91 [LeetCode] 989. Add to Array-Form of Integer https://leetcode.com/problems/add-to-array-form-of-integer Add to Array-Form of Integer - LeetCode Add to Array-Form of Integer - The array-form of an integer num is an array representing its digits in left to right order. * For example, for num = 1321, the array form is [1,3,2,1]. Given num, the array-form of an integer, and an integer k, return the ar leetcode.com 접근 정수 배열인 num 을 정수로 바꾸어 num 과.. 2023. 2. 15. [LeetCode] 278. First Bad Version https://leetcode.com/problems/first-bad-version/ 피봇을 사용하여 탐색하는 문제입니다. First Bad Version - LeetCode Can you solve this real interview question? First Bad Version - You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed base leetcode.com 솔루션 # The isBadVersion API is.. 2023. 2. 13. [LeetCode] 205. Isomorphic Strings 제 3의 문자열로 표현하여 문제를 해결할 수 있습니다. https://leetcode.com/problems/isomorphic-strings/ Isomorphic Strings - LeetCode Isomorphic Strings - Given two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving th leetcode.com 솔루션 class Solutio.. 2023. 2. 13. [LeetCode] 724. Find Pivot Index https://leetcode.com/problems/find-pivot-index Find Pivot Index - LeetCode Find Pivot Index - Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of all the numbers strictly to the index's righ leetcode.com 솔루션 class Solution: def pivotIndex(self, nums: List[i.. 2023. 2. 13. [Basic] 기본 알고리즘 정리노트 간단하게 정리한 알고리즘 기법 정리 노트입니다. String Two pointers : 두 개의 피봇을 활용해 탐색하는 기법 (이중반복 -> 단일반복) / 배열 Sliding window : 고정 길이 Two pointers, 시간 복잡도 최소화 / 해쉬맵과 함께 활용 Prefix sum : 일종의 전처리 기법 Rabin Karp algoritm : 라빈 카프 알고리즘, 긴 스트링을 해싱하여 연산량을 축소 e.g.) 0번째문자ASCII * 2^2 + 1번째 문자 ASCII * 2^1 + 2번째 문자 ASCII * 2^0 Search BFS : graph, visitied, queue 활용 DFS : recursion Backtracking : DFS를 주요 활용하나 탐색 도중 조건에 부합하지 않는 경우를.. 2023. 2. 13. [LeetCode] 167. Two Sum II - Input Array Is Sorted Two pointer 알고리즘을 활용하여 시간복잡도가 O(n) 이내가 되도록 문제를 풀어야 합니다. 본문 https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Two Sum II - Input Array Is Sorted - LeetCode Two Sum II - Input Array Is Sorted - Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two numbers be numbers.. 2023. 2. 12. 이전 1 ··· 12 13 14 15 16 다음