문제 Given two strings s and t, return true if t is an anagram of s, and false otherwise. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. s와 t 문자열이 주어지면, t가 s의 아나그램일 때 true를 반환하고 아니면 false를 반환한다. 아나그램이란, 단어를 구성하는 알파벳들이 다른 순서로 구성되어있는 또 다른 단어를 말한다. 예시 Example 1: Input: s = "anagram", t = "nagaram" ..
문제 Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. 주어진 nums 배열 요소 중 중복되는 값이 있다면 true, 없으면 false를 반환하라. 예시 Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3,4,3,2,4,2] Output: true 제약 조건 Constraints: 1
문제 You are given an integer array nums and an integer k. For each index i where 0
문제 Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. 문자열 문자열의 배열이 주어지면, 아나그램을 함께 그룹화합니다. 답변은 임의의 순서로 반환할 수 있습니다. 아나그램(Anagram)은 다른 단어나 구문의 글자를 재정렬하여 만들어진 단어나 구를 말합니다. 예시 Example 1: Input: strs = [..
문제 https://leetcode.com/problems/arithmetic-subarrays/ Arithmetic Subarrays - LeetCode 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 A sequence of numbers is called arithmetic if it consists of at least two elements, and the difference between every two consecutive elements is the same. M..
문제 https://leetcode.com/problems/k-closest-points-to-origin/submissions/ K Closest Points to Origin - LeetCode 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 Given an array of points where points[i] = [xi, yi] represents a point on the X-Y plane and an integer k, return the k closest point..
문제 You are given two strings s and t. String t is generated by random shuffling string s and then add one more letter at a random position. Return the letter that was added to t. 두 개의 문자열과 t가 주어집니다. 문자열 t는 임의의 셔플링 문자열에 의해 생성된 다음 임의의 위치에 문자를 하나 더 추가합니다. t에 추가된 문자를 반환한다. 예시 Example 1: Input: s = "abcd", t = "abcde" Output: "e" Explanation: 'e' is the letter that was added. Example 2: Input: s = ""..
문제 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, return true if the array can be rearranged to form an arithmetic progression. Otherwise, return false. arr 배열의 요소들간의 차가 일정하면 true, 일정하지 않다면 false를 반환한다. 예시 Example 1: Input: arr = [3,5,1] Output: true Explanation: We can reorder the eleme..
Comment