목록PS/LeetCode (576)
넘치게 채우기
https://leetcode.com/problems/longest-substring-without-repeating-characters/description/?envType=study-plan-v2&envId=top-interview-150 int: n = len(s) maxLen = 0 left = 0 charSet = set() for right in range(n): while s[right] in charSet: charSet.remove(s[left]) left += 1 charSet.add(s[right]) maxLen = max(maxLen, right - left + 1) return maxLen Java class Solution { public int lengthOfLongestSub..
https://leetcode.com/problems/excel-sheet-column-title/description/ Excel Sheet Column Title - LeetCode Can you solve this real interview question? Excel Sheet Column Title - Given an integer columnNumber, return its corresponding column title as it appears in an Excel sheet. For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 ... Example 1: I leetcode.com 문제 유형 : 문자열 처리 문제 난이도 : Eas..
https://leetcode.com/problems/repeated-substring-pattern/ Repeated Substring Pattern - LeetCode Can you solve this real interview question? Repeated Substring Pattern - Given a string s, check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. Example 1: Input: s = "abab" Output: true Expl leetcode.com 문제 유형 : 문자열 처리 문제 난이도 : Easy 문제 Giv..
https://leetcode.com/problems/minimum-size-subarray-sum/description/?envType=study-plan-v2&envId=top-interview-150 Minimum Size Subarray Sum - LeetCode Can you solve this real interview question? Minimum Size Subarray Sum - Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray whose sum is greater than or equal to target. If there is no s..
https://leetcode.com/problems/3sum/description/?envType=study-plan-v2&envId=top-interview-150 3Sum - LeetCode Can you solve this real interview question? 3Sum - Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0. Notice that the solution set must not contain du leetcode.com 문제 유형 : 투 포인터 문제 난..
https://leetcode.com/problems/maximal-network-rank/description/ Maximal Network Rank - LeetCode Can you solve this real interview question? Maximal Network Rank - There is an infrastructure of n cities with some number of roads connecting these cities. Each roads[i] = [ai, bi] indicates that there is a bidirectional road between cities ai and bi. The leetcode.com 문제 유형 : 그래프 문제 난이도 : Medium 문제 T..
https://leetcode.com/problems/01-matrix/description/ 01 Matrix - LeetCode Can you solve this real interview question? 01 Matrix - Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: [https://assets.leetcode.com/uploads/2021/04/24/01-1-g leetcode.com 문제 유형 : BFS / DFS (+Multi-Source BFS, 다중 출발점 BFS) 문제 난이도 ..
https://leetcode.com/problems/sliding-window-maximum/description/ Sliding Window Maximum - LeetCode Can you solve this real interview question? Sliding Window Maximum - You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the wind leetcode.com 문제 유형 : 슬라이딩 윈도우 문제 난이도 : Har..
https://leetcode.com/problems/partition-list/description/ Partition List - LeetCode Can you solve this real interview question? Partition List - Given the head of a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the original relative order of the no leetcode.com 문제 유형 : 연결 리스트 문제 난이도 : Medium 문제 Given the ..
https://leetcode.com/problems/container-with-most-water/description/?envType=study-plan-v2&envId=top-interview-150 Container With Most Water - LeetCode Can you solve this real interview question? Container With Most Water - You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]). Find two lines ..