목록알고리즘 (292)
넘치게 채우기
https://leetcode.com/problems/last-moment-before-all-ants-fall-out-of-a-plank/description/ Last Moment Before All Ants Fall Out of a Plank - LeetCode Can you solve this real interview question? Last Moment Before All Ants Fall Out of a Plank - We have a wooden plank of the length n units. Some ants are walking on the plank, each ant moves with a speed of 1 unit per second. Some of the ants move ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/dbqkLI/btszGx34yvU/JYkTynhn98ztjLGj4nXGM0/img.png)
https://school.programmers.co.kr/learn/courses/30/lessons/118669 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 - 등산코스 정하기 문제 유형: 해시, 다익스트라 문제 난이도: Level 3 문제 설명 XX산은 n개의 지점으로 이루어져 있습니다. 각 지점은 1부터 n까지 번호가 붙어있으며, 출입구, 쉼터, 혹은 산봉우리입니다. 각 지점은 양방향 통행이 가능한 등산로로 연결되어 있으며, 서로 다른 지점을 이동할 때 이 등산로를 이용해야 합니다. 이때, 등산로별로 이동하는데 일정 시간이 소요됩니다..
https://leetcode.com/problems/build-an-array-with-stack-operations/description/ 1) { for(int i = 0; i < to-from-1; i++) { operators.push_back("Push"); operators.push_back("Pop"); } } operators.push_back("Push"); } vector buildArray(vector& target, int n) { int lastNum = 0; for(int i = 0; i < target.size(); i++) { operate(lastNum, target[i]); lastNum = target[i]; } return operators; } };
https://school.programmers.co.kr/learn/courses/30/lessons/147354 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 - 테이블 해시 함수 문제 유형: 정렬, 비트 조작, 비트마스킹 문제 난이도: Level 2 문제 설명 완호가 관리하는 어떤 데이터베이스의 한 테이블은 모두 정수 타입인 컬럼들로 이루어져 있습니다. 테이블은 2차원 행렬로 표현할 수 있으며 열은 컬럼을 나타내고, 행은 튜플을 나타냅니다. 첫 번째 컬럼은 기본키로서 모든 튜플에 대해 그 값이 중복되지 않도록 보장됩니다. 완호는 이 테이..
https://leetcode.com/problems/poor-pigs/description/ leetcode - Poor Pigs 문제 유형 : 수학 / 조합 문제 난이도 : Hard 문제 There are buckets buckets of liquid, where exactly one of the buckets is poisonous. To figure out which one is poisonous, you feed some number of (poor) pigs the liquid to see whether they will die or not. Unfortunately, you only have minutesToTest minutes to determine which bucket is poiso..
https://leetcode.com/problems/count-vowels-permutation/description/ Count Vowels Permutation - LeetCode Can you solve this real interview question? Count Vowels Permutation - Given an integer n, your task is to count how many strings of length n can be formed under the following rules: * Each character is a lower case vowel ('a', 'e', 'i', 'o', 'u') * Each leetcode.com leetcode - Count Vowels Pe..
https://leetcode.com/problems/longest-palindromic-substring/ = 0 && right < s.size() && s[left] == s[right]) { left--; right++; } return right - left - 1; } string longestPalindrome(string s) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); const int n = s.size(); int maxLen = 0; int start = 0; for (int i = 0; i < n; i++) { int len1 = expandAroundCenter(s, i, i); int len2 = expandAroundC..
https://leetcode.com/problems/binary-trees-with-factors/ Binary Trees With Factors - LeetCode Can you solve this real interview question? Binary Trees With Factors - Given an array of unique integers, arr, where each integer arr[i] is strictly greater than 1. We make a binary tree using these integers, and each number may be used for any number of leetcode.com leetcode - 823. Binary Trees With F..
https://leetcode.com/problems/k-th-symbol-in-grammar/ K-th Symbol in Grammar - LeetCode Can you solve this real interview question? K-th Symbol in Grammar - We build a table of n rows (1-indexed). We start by writing 0 in the 1st row. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each o leetcode.com leetcode - K-th Symbol in Grammar 문제 유형 ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/qdQpH/btsy8j6TKMF/FaWgIKK32RBKHnDMadxkc0/img.png)
https://school.programmers.co.kr/learn/courses/30/lessons/136797 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 프로그래머스 - 숫자 타자 대회 문제 유형 : 다이나믹 프로그래밍, 재귀, dfs 문제 난이도 : Level 3 문제 설명 위와 같은 모양으로 배열된 숫자 자판이 있습니다. 숫자 타자 대회는 이 동일한 자판을 사용하여 숫자로만 이루어진 긴 문자열을 누가 가장 빠르게 타이핑하는지 겨루는 대회입니다. 대회에 참가하려는 민희는 두 엄지 손가락을 이용하여 타이핑을 합니다. 민희는 항상 왼손 엄지를 4 ..