일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |
- 일본어공부
- 백준
- 마이라이트
- SWEA
- 코딩테스트
- 코테준비
- 일본어독학
- 정렬
- 가벼운학습지
- 코테
- mybatis
- 삼성소프트웨어아카데미
- java
- 인프런
- 프로그래머스
- 성인학습지
- 일본어학습지
- array
- 삼성
- 카카오
- 코딩
- 스텍
- stack
- 자바
- 가벼운학습지후기
- javascript
- 알고리즘
- js
- 자료구조
- 자바스크립트
- Today
- Total
목록알고리즘 (6)
개발에 AtoZ까지
1. 문제 Every email consists of a local name and a domain name, separated by the @ sign. For example, in alice@leetcode.com, alice is the local name, and leetcode.com is the domain name. Besides lowercase letters, these emails may contain '.'s or '+'s. If you add periods ('.') between some characters in the local name part of an email address, mail sent there will be forwarded to the same address ..
1. 문제 You are given a license key represented as a string S which consists only alphanumeric character and dashes. The string is separated into N+1 groups by N dashes. Given a number K, we would want to reformat the strings such that each group contains exactly K characters, except for the first group which could be shorter than K, but still must contain at least one character. Furthermore, ther..
1. 문제 You're given strings J representing the types of stones that are jewels, and S representing the stones you have. Each character in S is a type of stone you have. You want to know how many of the stones you have are also jewels. The letters in J are guaranteed distinct, and all characters in J and S are letters. Letters are case sensitive, so "a" is considered a different type of stone from..
1. 문제 Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required. Input: [[0,30],[5,10],[15,20]] Output: 2 Input: [[7,10],[2,4]] Output: 1 2. 문제해설 회의실 사용 시간이 Input으로 주어졌을 때 회의실이 몇 개 필요한지 개수를 구하라 3. 코드 포맷 public class MeetingRoom2 { public static void main(String[] args) { MeetingRoom2 a = new Me..

1. 문제 Given a collection of intervals, merge all overlapping intervals. Input: [[1,3],[2,6],[8,10],[15,18]] Output: [[1,6],[8,10],[15,18]] 2. 문제해설 겹치는 부분을 통합하여라(ex, Input: [1,3],[2,6], Output:[1,6]) 3. 코드포맷 class Interval { int start; int end; Interval() { this.start = 0; this.end = 0; } Interval(int s, int e) { this.start = s; this.end = e; } @Override public String toString() { return start + ..

1. 정의 - 그래프 탐색의 한 종류로 하나의 정점으로부터 시작하여 차례대로 모든 정점들을 한번씩 방문하는 것 - 자세하게는 루트노드( 혹은 다른 임의의 노드)에서 시작해서 다음 분기(branch)로 넘어가기 전에 해당 분기를 완벽하게 탐색하는 방법 - 넓게(Wide) 탐색하기 전에 깊게(deep) 탐색하는 방식의 알고리즘 2. 특징 - 자기 자신을 호출하는 순환 알고리즘(재귀)의 형태를 가짐 - 전위 순회(Pre-Order Trversals)를 포함한 다른 형태의 트리 순회는 모두 DFS의 한 종류이다. - DFS 알고리즘 사용시 어떤 노드를 방문했었는지를 반드시 확인하여야함(안그러면 무한루프가 발생할 수 있음) 3. DFS 동작 과정 1. 0번 노드가 시작 정점이라고 한다면 0번 노드와 인접한 노드들..