목록PS/LeetCode (586)
넘치게 채우기
https://leetcode.com/problems/remove-k-digits/description/ Leetcode - Remove K Digits 문제 유형 : 스택 문제 난이도 : Medium 문제 Given string num representing a non-negative integer num, and an integer k, return the smallest possible integer after removing k digits from num. 양의정수를 표현하는 문자열 num이 주어집니다. num에서 k개의 정수를 제거한 가장 작은 수를 구하시오. 풀이 스택을 이용하여 풀 수 있다. 수를 하나씩 스택에 담는다. 만약에 이번에 넣을 수보다 큰 수들이 있다면, 그 수들은 기존 스택에서..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/oJMm2/btsGuJ5aGX2/n8KDjm0C44zidJRuzIS08k/img.png)
https://leetcode.com/problems/reveal-cards-in-increasing-order/description/ Leetcode - Reveal Cards In Increasing Order 문제 유형 : 스택, 큐 문제 난이도 : Medium 문제 You are given an integer array deck. There is a deck of cards where every card has a unique integer. The integer on the ith card is deck[i]. You can order the deck in any order you want. Initially, all the cards start face down (unrevealed) in o..
https://leetcode.com/problems/time-needed-to-buy-tickets/description/ LeetCode - Time Needed to Buy Tickets 문제 유형 : 큐 문제 난이도 : Easy 문제 There are n people in a line queuing to buy tickets, where the 0th person is at the front of the line and the (n - 1)th person is at the back of the line. You are given a 0-indexed integer array tickets of length n where the number of tickets that the ith person ..
https://leetcode.com/problems/number-of-students-unable-to-eat-lunch/description/ Leetcode - Number of Students Unable to Eat Lunch 문제 유형 : 스택, 큐 문제 난이도 : Easy 문제 The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. Each student either prefers square or circular sandwiches. The number of sandwiches ..
https://leetcode.com/problems/valid-parenthesis-string/submissions/1225282138/ Leetcode - Valid Parenthesis String 문제 유형 : 문자열 처리, 스택 문제 난이도 : Medium 문제 Given a string s containing only three types of characters: '(', ')' and '*', return true if s is valid. The following rules define a valid string: Any left parenthesis '(' must have a corresponding right parenthesis ')'. Any right parenthesis '..
https://leetcode.com/problems/minimum-remove-to-make-valid-parentheses/description/ Leetcode - Minimum Remove to Make Valid Parentheses 문제 유형 : 문자열 처리 / 스택 문제 난이도 : Medium 문제 Given a string s of '(' , ')' and lowercase English characters. Your task is to remove the minimum number of parentheses ( '(' or ')', in any positions ) so that the resulting parentheses string is valid and return any vali..
https://leetcode.com/problems/make-the-string-great/description/ Leetcode - Make The String Great 문제 유형 : 문자열 처리 문제 난이도 : Easy 문제 Given a string s of lower and upper case English letters. A good string is a string which doesn't have two adjacent characters s[i] and s[i + 1] where: 0
https://leetcode.com/problems/maximum-nesting-depth-of-the-parentheses/description/ Leetcode - Maximum Nesting Depth of the Paretheses 문제 유형 : 문자열 처리, 스택 문제 난이도 : Easy 문제 A string is a valid parentheses string (denoted VPS) if it meets one of the following: It is an empty string "", or a single character not equal to "(" or ")", It can be written as AB (A concatenated with B), where A and B are ..
https://leetcode.com/problems/word-search/description/ Leetcode - Word Search 문제 유형 : 문자열 처리, dfs, 백트래킹 문제 난이도 : Medium 문제 Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used m..
https://leetcode.com/problems/isomorphic-strings/description/ Leetcode - Isomorphic Strings 문제 유형 : 해시 / 문자열 처리 문제 난이도 : Easy 문제 Given two strings s and t, determine if they are isomorphic. Two strings s and t are isomorphic if the characters in s can be replaced to get t. All occurrences of a character must be replaced with another character while preserving the order of characters. No two char..