LeetCode

Algorithm/PTUStudy

16주차. 그래프(조합)

35. 조합 https://leetcode.com/problems/combinations/ Combinations - LeetCode Can you solve this real interview question? Combinations - Given two integers n and k, return all possible combinations of k numbers chosen from the range [1, n]. You may return the answer in any order. Example 1: Input: n = 4, k = 2 Output: [[1,2],[1,3 leetcode.com 📌문제 전체 수 n을 입력 받아 k개의 조합을 리턴하라. - 예제1 📝입력 n = 4, k = 2 💻..

Algorithm/PTUStudy

16주차. 그래프(순열)

34. 순열 https://leetcode.com/problems/permutations/description/ Permutations - LeetCode Can you solve this real interview question? Permutations - Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2,3] Output: [[1,2,3],[1,3,2],[2,1,3],[2,3,1], leetcode.com 📌문제 서로 다른 정수를 입력받아 가능한 모든 순열을 리턴하라. - 예제1 📝입..

Algorithm/PTUStudy

15주차. 그래프(전화번호 문자 조합)

33. 전화번호 문자 조합 https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Letter Combinations of a Phone Number - LeetCode Can you solve this real interview question? Letter Combinations of a Phone Number - Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any order. A mapping of d leetcode..

Algorithm/PTUStudy

15주차. 그래프(섬의 개수 리팩토링)

32. 섬의 개수 https://leetcode.com/problems/top-k-frequent-elements/ 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 📌문제 1을 육지로 0을 물로 가정한 2D 그리드 맵이 주..

Algorithm/PTUStudy

14주차. 그래프(섬의 개수)

32. 섬의 개수 https://leetcode.com/problems/top-k-frequent-elements/ 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 📌문제 1을 육지로 0을 물로 가정한 2D 그리드 맵이 주..

Algorithm/PTUStudy

13주차. 해시 테이블(상위 K 빈도 요소)

31. 상위 K 빈도 요소 https://leetcode.com/problems/top-k-frequent-elements/ 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 📌문제 K번 이상 등장하는 요소를 추출하라(라고 ..

Algorithm/PTUStudy

12주차. 해시 테이블(중복 문자 없는 가장 긴 부분 문자열)

30. 중복 문자 없는 가장 긴 부분 문자열 https://leetcode.com/problems/longest-substring-without-repeating-characters/

Algorithm/PTUStudy

12주차. 해시 테이블(보석과 돌)

29. 보석과 돌 https://leetcode.com/problems/jewels-and-stones/ Merge k Sorted Lists - LeetCode Can you solve this real interview question? Merge k Sorted Lists - You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Example 1: Input: lis leetcode.com 📌문제 J는 보석이며 S는 갖고있는 돌이다. S에는 보석이 몇 개나 있을..

Algorithm/PTUStudy

10주차. 데크, 우선순위(k개 정렬 리스트 병합)

27. k개 정렬 리스트 병합 https://leetcode.com/problems/merge-k-sorted-lists/ Merge k Sorted Lists - LeetCode Can you solve this real interview question? Merge k Sorted Lists - You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list and return it. Example 1: Input: lis leetcode.com 📌문제 k개의 정렬된 리스트를 1개의 정렬된 리스트로 ..

Algorithm/PTUStudy

10주차. 데크, 우선순위 큐(원형 데크 디자인)

26. 원형 데크 디자인 https://leetcode.com/problems/design-circular-deque/ Design Circular Deque - LeetCode Can you solve this real interview question? Design Circular Deque - Design your implementation of the circular double-ended queue (deque). Implement the MyCircularDeque class: * MyCircularDeque(int k) Initializes the deque with a maximum size of k. * boole leetcode.com 📌문제 다음 연산을 제공하는 원형 데크를 디자인하라..

지구우중
'LeetCode' 태그의 글 목록