본문 바로가기
반응형

전체 글167

[LeetCode 해석 및 풀이] 3.Longest Substring Without Repeating Characters LeetCode 문제 해석 및 풀이 방법 문제 3.Longest Substring Without Repeating Characters(반복되는 글자 없는 가장 긴 부분 문자열)바로가기 문제 설명영문Given a string s, find the length of the longest substring without repeating characters.한글문자열 s가 주어졌을 때, 반복되는 글자가 없는 가장 긴 부문 문자열의 길이를 구하시오 제한조건0 s consists of English letters, digits, symbols and spaces. 입출력 예입력출력"abcabcbb"3"bbbbb"1"pwwkew"3  해답 및 해설파이썬 (Python)neetcode 로드맵에 나온 대로 슬라이딩 윈.. 2024. 5. 7.
[LeetCode 해석 및 풀이] 271. String Encode and Decode LeetCode 문제 해석 및 풀이 방법 문제 271. String Encode and Decode(문자열을 인코드, 디코드하기 )바로가기 무료버전 바로가기문제 설명영문Design an algorithm to encode a list of strings to a single string. The encoded string is then decoded back to the original list of strings. Please implement encode and decode한글리스트의 문자열을 하나의 문자열로 인코드하는 알고리즘을 작성하시오. 그런 다음 인코딩된 문자열은 원래 문자열 목록으로 다시 디코딩됩니다. encode와 decode를 구현하십시오. 제한조건0 0 strs[i] contains o.. 2024. 5. 6.
[LeetCode 해석 및 풀이] 121. Best Time to Buy and Sell Stock LeetCode 문제 해석 및 풀이 방법 문제 121. Best Time to Buy and Sell Stock(주식을 사고팔기 가장 좋은 시간)바로가기 문제 설명영문You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you can.. 2024. 5. 1.
[LeetCode 해석 및 풀이] 981. Time Based Key-Value Store LeetCode 문제 해석 및 풀이 방법 문제 981. Time Based Key-Value Store(시간 기반 키-값 저장) 바로가기 문제 설명 영문 Design a time-based keyvalue data structure that can store multiple values for the same key at different time stamps and retrieve the key's value at a certain timestamp. Implement the TimeMap class: TimeMap() Initializes the object of the data structure. void set(String key, String value, int timestamp) Stores .. 2024. 4. 23.
[LeetCode 해석 및 풀이] 33. Search in Rotated Sorted Array LeetCode 문제 해석 및 풀이 방법 문제 33. Search in Rotated Sorted Array(한글 번역) 바로가기 문제 설명 영문 There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 2024. 4. 23.
[LeetCode 해석 및 풀이] 153. Find Minimum in Rotated Sorted Array LeetCode 문제 해석 및 풀이 방법 문제 153. Find Minimum in Rotated Sorted Array(돌아간 정렬된 배열에서 최소값 찾기) 바로가기 문제 설명 영문 Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become: [4,5,6,7,0,1,2] if it was rotated 4 times. [0,1,2,4,5,6,7] if it was rotated 7 times. Notice that rotating an array [a[0], a[1], a[2], ..., a[n-1].. 2024. 4. 22.
반응형