목록해시 (37)
넘치게 채우기
https://leetcode.com/problems/kth-distinct-string-in-an-array/description/?envType=daily-question&envId=2024-08-05leetcode - Kth Distinct String in an Array문제 유형 : 해시, 문자열처리문제 난이도 : Easy 문제A distinct string is a string that is present only once in an array.Given an array of strings arr, and an integer k, return the kth distinct string present in arr. If there are fewer than k distinct strings, r..
https://leetcode.com/problems/sort-the-jumbled-numbers/description/leetcode - Sort the Jumbled Numbers문제 유형 : 정렬, 해시문제 난이도 : Medium 문제You are given a 0-indexed integer array mapping which represents the mapping rule of a shuffled decimal system. mapping[i] = j means digit i should be mapped to digit j in this system.The mapped value of an integer is the new integer obtained by replacing each occ..
https://leetcode.com/problems/find-center-of-star-graph/description/leetcode - Find Center of Star Graph문제 유형 : 그래프, 해시문제 난이도 : Easy 문제There is an undirected star graph consisting of n nodes labeled from 1 to n. A star graph is a graph where there is one center node and exactly n - 1 edges that connect the center node with every other node.You are given a 2D integer array edges where each edges[..
https://leetcode.com/problems/relative-sort-array/description/leetcode - Relative Sort Array문제 유형 : 정렬, 해시문제 난이도 : Easy 문제Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also in arr1.Sort the elements of arr1 such that the relative ordering of items in arr1 are the same as in arr2. Elements that do not appear in arr2 should be placed at the end of ..
https://leetcode.com/problems/hand-of-straights/description/leetcode - Hand of Straights문제 유형 : 우선순위 큐, 그리디, 해시문제 난이도 : Medium 문제Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of groupSize consecutive cards.Given an integer array hand where hand[i] is the value written on the ith card and an integer groupSize,..
https://leetcode.com/problems/subarrays-with-k-different-integers/ Leetcode - Subarrays with K Different Integers 문제 유형 : 슬라이딩 윈도우 / 해시 문제 난이도 : Hard 문제 Given an integer array nums and an integer k, return the number of good subarrays of nums. A good array is an array where the number of different integers in that array is exactly k. For example, [1,2,3,1,2] has 3 different integers: 1, 2, and 3..
https://leetcode.com/problems/length-of-longest-subarray-with-at-most-k-frequency/description/ Leetcode - Length of Longest Subarray With at Most K Frequency 문제 유형 : 슬라이딩 윈도우, 해시 문제 난이도 : Medium 문제 You are given an integer array nums and an integer k. The frequency of an element x is the number of times it occurs in an array. An array is called good if the frequency of each element in this array..
https://leetcode.com/problems/intersection-of-two-arrays/description/ Leetcode - Intersection of Two Arrays 문제 유형 : 해시, 그리디 문제 난이도 : Easy 문제 Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must be unique and you may return the result in any order. 두 정수배열 nums1과 nums2가 주어진다. 교차점을 반환하시오. 결과의 각 요소는 값이 겹치면 안되고, 순서는 상관없습니다. 풀이 해시맵에 nums1의 요소..
https://leetcode.com/problems/count-elements-with-maximum-frequency/description/ Leetcode - Count Elements With Maximum Frequency 문제 유형 : 해시, 그리디 문제 난이도 : Easy 문제 You are given an array nums consisting of positive integers. Return the total frequencies of elements in nums such that those elements all have the maximum frequency. The frequency of an element is the number of occurrences of that ele..
https://leetcode.com/problems/missing-number/description/ LeetCode - The World's Leading Online Programming Learning Platform 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 - Missing Number 문제 유형 : 정렬, 해시, 비트마스킹, 수학 문제 난이도 : Easy 문제 Given an array nums containing n distinct number..