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개의 정렬된 리스트로 ..
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 📌문제 다음 연산을 제공하는 원형 데크를 디자인하라..
25. 원형 큐 디자인 https://leetcode.com/problems/design-circular-queue/ Design Circular Queue - LeetCode Can you solve this real interview question? Design Circular Queue - Design your implementation of the circular queue. The circular queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle, and the leetcode.com 📌문제 원형 큐를 디자인하라 - 예제1 📝입력 ["My..
24. 스택을 이용한 큐 구현 https://leetcode.com/problems/implement-queue-using-stacks/ Implement Queue using Stacks - LeetCode Can you solve this real interview question? Implement Queue using Stacks - Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, peek, pop, and empty). Implement t leetcode.com 📌문제 스택을 이용해..
21. 중복 문자 제거 https://leetcode.com/problems/implement-stack-using-queues/ Implement Stack using Queues - LeetCode Can you solve this real interview question? Implement Stack using Queues - Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (push, top, pop, and empty). Implement the leetcode.com 📌문제 큐를 이용해 다음 연..
17413. 단어 뒤집기 https://www.acmicpc.net/problem/17413 17413번: 단어 뒤집기 2 문자열 S가 주어졌을 때, 이 문자열에서 단어만 뒤집으려고 한다. 먼저, 문자열 S는 아래와과 같은 규칙을 지킨다. 알파벳 소문자('a'-'z'), 숫자('0'-'9'), 공백(' '), 특수 문자('')로만 이루어져 www.acmicpc.net 📌문제 - 예제1 📝입력 baekjoon online judge ef gh 💻출력 noojkeab enilno egduj fe hg 📌풀이(플래그, 스택 활용) 244ms, 22380kb import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamR..
10866. https://www.acmicpc.net/problem/10866 10866번: 덱 첫째 줄에 주어지는 명령의 수 N (1 ≤ N ≤ 10,000)이 주어진다. 둘째 줄부터 N개의 줄에는 명령이 하나씩 주어진다. 주어지는 정수는 1보다 크거나 같고, 100,000보다 작거나 같다. 문제에 나와있지 www.acmicpc.net 📌문제 - 예제1 📝입력 15 push_back 1 push_front 2 front back size empty pop_front pop_back pop_front size empty pop_back push_front 3 empty front 💻출력 2 1 2 0 2 1 -1 0 1 -1 0 3 📌풀이 216ms, 18588kb import java.io.Buffe..
22. 일일 온도 https://leetcode.com/problems/daily-temperatures/ Daily Temperatures - LeetCode Can you solve this real interview question? Daily Temperatures - Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer leetcode.com 📌문제 매일의 화씨 온도 리스트 T를 입력받아서, 더 따뜻한 날씨를 위..
21. 중복 문자 제거 https://leetcode.com/problems/remove-duplicate-letters/ Remove Duplicate Letters - LeetCode Can you solve this real interview question? Remove Duplicate Letters - Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your result is the smallest in lexicographical order among all possible re leetcode.com 📌문제 중복된 문자를 제외하고 사전식 순서..
20. 유효한 괄호 https://leetcode.com/problems/valid-parentheses/ Valid Parentheses - LeetCode Can you solve this real interview question? Valid Parentheses - Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: 1. Open brackets must be closed by the sam leetcode.com 📌문제 괄호로 된 입력값이 올바른지 판별하라 - 예제1 📝입력 Inpu..