목록릿코드 (85)
넘치게 채우기
https://leetcode.com/problems/can-make-arithmetic-progression-from-sequence/description/ Can Make Arithmetic Progression From Sequence - LeetCode Can you solve this real interview question? Can Make Arithmetic Progression From Sequence - A sequence of numbers is called an arithmetic progression if the difference between any two consecutive elements is the same. Given an array of numbers arr, ret..
https://leetcode.com/problems/check-if-it-is-a-straight-line/description/ Check If It Is a Straight Line - LeetCode Can you solve this real interview question? Check If It Is a Straight Line - You are given an array coordinates, coordinates[i] = [x, y], where [x, y] represents the coordinate of a point. Check if these points make a straight line in the XY plane. leetcode.com 문제 유형 : 수학 문제 난이도 : ..
https://leetcode.com/problems/number-of-provinces/description/ Number of Provinces - LeetCode Can you solve this real interview question? Number of Provinces - There are n cities. Some of them are connected, while some are not. If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indire leetcode.com 문제 유형 : 완전 탐색 / dfs 문제 난이도 : Mediu..
https://leetcode.com/problems/minimum-path-sum/description/ Minimum Path Sum - LeetCode Can you solve this real interview question? Minimum Path Sum - Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or rig leetcode.com 문제 유형 : 다이나믹 프로그래밍 문제 난이도 : Medium Given..
https://leetcode.com/problems/design-hashset/description/ Design HashSet - LeetCode Can you solve this real interview question? Design HashSet - Design a HashSet without using any built-in hash table libraries. Implement MyHashSet class: * void add(key) Inserts the value key into the HashSet. * bool contains(key) Returns whether the value leetcode.com 문제 유형 : 해시 문제 난이도 : Easy Design a HashSet wi..
https://leetcode.com/problems/maximum-subarray/description/ Maximum Subarray - LeetCode Can you solve this real interview question? Maximum Subarray - Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] has t leetcode.com 문제 유형 : 다이나믹 프로그래밍 / 카데인 알고리즘 문제 난이도 : Medi..
https://leetcode.com/problems/maximum-subsequence-score/description/ Maximum Subsequence Score - LeetCode Can you solve this real interview question? Maximum Subsequence Score - You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from nums1 of length k. For chosen indic leetcode.com 문제 유형 : 우선순위 큐 문제 난이도 ..
https://leetcode.com/problems/top-k-frequent-elements/description/ Top K Frequent Elements - LeetCode Can you solve this real interview question? Top K Frequent Elements - Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] leetcode.com 문제 유형 : 해시, 힙 문제 난이도 : Medium ..
https://leetcode.com/problems/shortest-bridge/description/ Shortest Bridge - LeetCode Can you solve this real interview question? Shortest Bridge - You are given an n x n binary matrix grid where 1 represents land and 0 represents water. An island is a 4-directionally connected group of 1's not connected to any other 1's. There are exactly leetcode.com 문제 유형 : DFS / BFS 문제 난이도 : Medium 문제 You ar..
https://leetcode.com/problems/is-graph-bipartite/description/ Is Graph Bipartite? - LeetCodeCan you solve this real interview question? Is Graph Bipartite? - There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. Moleetcode.com문제 유형 : DFS / BFS 문제 난이도 : Medium 문제 T..