본문 바로가기

분류 전체보기414

프로그래머스 리코쳇 로봇 문제 URL : https://school.programmers.co.kr/learn/courses/30/lessons/169199 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 접근법: bfs문제입니다. 난이도는 쉬우니 딱히 크게 얘기는 하지 않겠고 이동할때 벽을부딪힐때까지만 이동해서 G를 이동만하면되는 문제입니다. 소스코드 : #include using namespace std; int n,m; int dy[4]={-1,0,1,0}; int dx[4]={0,1,0,-1}; bool isrange(int y,int x){ return 0 2023. 9. 12.
[LeetCode] 875. Koko Eating Bananas 문제 URL : https://leetcode.com/problems/koko-eating-bananas/description/ Koko Eating Bananas - LeetCode Can you solve this real interview question? Koko Eating Bananas - Koko loves to eat bananas. There are n piles of bananas, the ith pile has piles[i] bananas. The guards have gone and will come back in h hours. Koko can decide her bananas-per-hour eating sp leetcode.com 문제 접근법 : 이분탐색을 요구하는 문제입니다.. 2023. 9. 12.
[LeetCode] 2834. Find the Minimum Possible Sum of a Beautiful Array 문제 URL : https://leetcode.com/problems/find-the-minimum-possible-sum-of-a-beautiful-array/ Find the Minimum Possible Sum of a Beautiful Array - LeetCode Can you solve this real interview question? Find the Minimum Possible Sum of a Beautiful Array - You are given positive integers n and target. An array nums is beautiful if it meets the following conditions: * nums.length == n. * nums consists o.. 2023. 9. 12.
[LeetCode] 300. Longest Increasing Subsequence 문제 URL :https://leetcode.com/problems/longest-increasing-subsequence/ Longest Increasing Subsequence - LeetCode Can you solve this real interview question? Longest Increasing Subsequence - Given an integer array nums, return the length of the longest strictly increasing subsequence. Example 1: Input: nums = [10,9,2,5,3,7,101,18] Output: 4 Explanation: The longest leetcode.com 문제 접근법 : 정말오랜만에 보는 .. 2023. 9. 12.