문제 Given an array of integers nums and an integer k, return the number of contiguous subarrays where the product of all the elements in the subarray is strictly less than k. 정수 숫자와 정수 k의 배열이 주어지면, 부분 배열의 모든 원소의 곱이 k보다 확실히 작은 연속 부분 배열의 수를 반환한다. 예시 Example 1: Input: nums = [10,5,2,6], k = 100 Output: 8 Explanation: The 8 subarrays that have product less than 100 are: [10], [5], [2], [6], [10, 5], ..
문제 Given two strings s and p, return an array of all the start indices of p's anagrams in s. You may 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. 두 개의 문자열과 p가 주어지면 p의 아나그램의 모든 시작 지수 배열을 s 단위로 반환합니다. 답변은 어떤 순서로든 반환할 수 있습니다. 아나그램(Anagram)은 다른 단어나 구문의 글자를 재정렬하여 만..
문제 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 = [..
문제 A company has n employees with a unique ID for each employee from 0 to n - 1. The head of the company is the one with headID. Each employee has one direct manager given in the manager array where manager[i] is the direct manager of the i-th employee, manager, [headID] = -1. Also, it is guaranteed that the subordination relationships have a tree structure. The head of the company wants to info..
문제 https://leetcode.com/problems/next-greater-element-iii/ Next Greater Element III - 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 a positive integer n, find the smallest integer which has exactly the same digits existing in the integer n and is greater in value than n. If..
문제 https://leetcode.com/problems/next-greater-element-ii/ Next Greater Element II - 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 a circular integer array nums (i.e., the next element of nums[nums.length - 1] is nums[0]), return the next greater number for every element in ..
문제 Given an n-ary tree, return the level order traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples). n-ary 트리가 지정된 경우 해당 노드 값의 수준 순서 통과를 반환합니다. Nary-Tree 입력 직렬화는 레벨 순서 순회(traversal)로 표현되며, 각 자식 그룹은 null 값으로 구분됩니다(예제 참조). 예시 Example 1: Input: root = [1,null,3,2,4,null,5,6] ..
문제 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..
Comment