일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 프로그래머스
- 2251
- 미로 탈출 명령어
- 리트코드
- DFS
- 알고리즘
- 자바
- 847
- 표편집
- Java
- 셔틀버스
- PCCP
- Number of Flowers in Full Bloom
- Heap
- Shortest Path Visiting All Nodes
- leetcode
- 양궁대회
- reconstruct itinerary
- 백준
- 소셜 광고
- 카드 짝 맞추기
- Eliminate Maximum Number of Monsters
- 백트래킹
- BFS
- 구현
- 주사위고르기
- SW아카데미
- n+1카드게임
- 주사위 고르기
- 332
- Today
- Total
목록전체 글 (16)
알고리즘이 재미있다

https://leetcode.com/problems/eliminate-maximum-number-of-monsters/ Eliminate Maximum Number of Monsters - LeetCode Can you solve this real interview question? Eliminate Maximum Number of Monsters - You are playing a video game where you are defending your city from a group of n monsters. You are given a 0-indexed integer array dist of size n, where dist[i] is the initi leetcode.com 정렬을 이용한 간단한 ..

https://www.acmicpc.net/problem/9335 9335번: 소셜 광고 진욱이는 새로운 소셜 네트워킹 회사를 만들기로 결심했다. 하지만 기존의 페이스북 이나 트위터 같이 인기있는 소셜 네트워크 서비스는 이미 수십억의 사용자를 가지고 있고, 진욱이는 이들과 www.acmicpc.net 오랜만에 백준을 풀었는데 재미있는 문제가 있어서 가져왔다. 백트래킹을 통한 완전탐색 문제이다. 핵심 각각의 사람마다 광고를 보여줄지, 안 보여줄지 선택한다. 최대 인원은 20이다 -> 2^20 이므로 충분히 가능한 시간이다. 정답 코드 import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { ..

https://leetcode.com/problems/number-of-flowers-in-full-bloom/ LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 현재의 people 위치에서 꽃이 몇 개가 있는지를 체크하는 문제이다. 매우 단순한 방법으로 브루트포스를 생각할 수 있지만, 시간복잡도 때문에 우선순위 큐를 활용하여 풀 수 있었다. 핵심 문제의 요구 ..