본문 바로가기

반응형

전체 글

(644)
프로그래머스 : 조이스틱 import java.util.*; class Solution { public int solution(String name) { int answer = name.length()-1; for(int i=0;i
프로그래머스 : 큰 수 만들기 import java.util.*; class Solution { public String solution(String number, int k) { Stack stack = new Stack(); stack.push(number.charAt(0)-'0'); int i = 0; for(i=1;i
프로그래머스 : 구명보트 import java.util.*; class Solution { public int solution(int[] people, int limit) { Arrays.sort(people); int front = 0; int rear = people.length-1; int answer = 0; while(front
프로그래머스 : 섬 연결하기 import java.util.*; class Solution { static int[] parrent; public int Find(int x){ if(x==parrent[x]){ return x; } return parrent[x] = Find(parrent[x]); } public boolean Union(int x, int y){ x = Find(x); y = Find(y); if(x==y) return false; parrent[x] = y; return true; } public class NC implements Comparator{ @Override public int compare(int[] o1,int[] o2) { return o1[2] - o2[2]; } } public int so..
Do it! 리액트 프로그래밍 정석 지금 까지 프로젝트를 진행하면서 Vue 프레임워크를 사용해보았다. 하지만 겉만 핥는 식으로 사용해봄.. 그래서 이번에는 세계적으로 front-end에서 가장 많이 사용하는 React를 공부해보자고 해서 구입하였다. 완독은 10일정도로 목표로 삼고있다. (10일이면 다볼것같음.. 하루에 4시간식) ㅎㅇㅌ
프로그래머스 : 모의고사 import java.util.*; class Solution { static int h1[] ={1,2,3,4,5}; static int h2[] ={2,1,2,3,2,4,2,5}; static int h3[] ={3,3,1,1,2,2,4,4,5,5}; public int[] solution(int[] answers) { int answer[] = new int[3]; int h1Cnt = 0; int h2Cnt = 0; int h3Cnt = 0; int index = 0; for(int i=0;i i!=0).toArray(); } }
의미론적 태그 의미만 잇는 태그. 하지만 html을 작성할 때 의미를 중점으로 코딩해야 나중에 재사용가능성이 높아진다. article 본문 aside 광고와 같이 페이지의 내용과는 관계가 적은 내용들 details 기본적으로 표시되지 화면에 표시되지 않는 정보들을 정의 figure 삽화나 다이어그램과 같은 부가적인 요소를 정의 footer 화면의 하단에 위치하는 사이트나 문서의 전체적인 정보를 정의 header 화면의 상단에 위치하는 사이트나 문서의 전체적인 정보를 정의 main 문서에서 가장 중심이 되는 컨텐츠를 정의 mark 참조나 하이라이트 표시를 필요로 하는 문자를 정의 nav 문서의 네비게이션 항목을 정의 section 문서의 구획들을 정의 (참고) time 시간을 정의 HTML 기술소개 기본문법 하이퍼텍스트..
프로그래머스 : 이중우선순위큐 MaxHeap MinHeap 두개만들어서 사용하면된다. java에서는 remove함수가 잇어서 log(n)으로 제거가능하다. 따라서 시간초과 걱정 X package excercise; import java.util.Comparator; import java.util.PriorityQueue; import java.util.Queue; import java.util.StringTokenizer; public class 이중우선순위큐 { public int[] solution(String[] operations) { Queue MinHeap = new PriorityQueue(); Queue MaxHeap = new PriorityQueue(Comparator.reverseOrder()); int[] ans..

반응형