본문 바로가기 메뉴 바로가기

develop_C

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

develop_C

검색하기 폼
  • 분류 전체보기 (29)
    • 알고리즘 (13)
      • 문제 (8)
      • 이론 (4)
    • JAVA (7)
      • Spring (6)
      • JPA (1)
      • Spring Cloud (0)
    • Javascript (5)
      • react (5)
      • JavaScript (0)
    • Database (4)
      • redis (4)
  • 방명록

전체 글 (29)
프로그래머스 : 후보키 (2019 KAKAO BLIND RECRUITMENT)

Code import java.util.*; class Solution { Comparator comp = new Comparator() { int countBits(int n){ int ret = 0 ; while(n!=0){ if((n&1) != 0) ++ ret; n = n >>1; } return ret; } @Override public int compare(Integer o1, Integer o2) { int x = countBits(o1), y= countBits(o2); return x-y; } }; public int solution(String[][] relation){ int answer = 0; int row = relation.length; int cols = relation[0]..

알고리즘/문제 2022. 1. 9. 17:05
프로그래머스 : 프린터

Link 코딩테스트 연습 - 프린터 Code import java.util.*; class Solution { public int solution(int[] priorities, int location) { int answer = 0 ; PriorityQueue queue = new PriorityQueue(Collections.reverseOrder()); for(int i : priorities){ queue.add(i); } int count = 0 ; while(!queue.isEmpty()){ for(int i =0 ; i < priorities.length; i++){ if(priorities[i] == queue.peek()){ count++; queue.poll(); if(i == loca..

알고리즘/문제 2022. 1. 9. 17:05
프로그래머스: 스킬트리

Link 코딩테스트 연습 - 스킬트리 Code class Solution { public int solution(String skill, String[] skill_trees) { int answer = 0; Skilldata[] skillPrev = new Skilldata[skill_trees.length]; for(int i =0 ; i < skillPrev.length ; i++){ skillPrev[i] = new Skilldata(); } for(int i = 0 ; i

알고리즘/문제 2022. 1. 9. 17:05
프로그래머스 : 메뉴 리뉴얼 (2021 KAKAO BLIND RECRUITMENT)

Link 코딩테스트 연습 - 메뉴 리뉴얼 Code import java.util.*; class Solution { public String[] solution(String[] orders, int[] course) { String[] answer = {}; HashMap map = new HashMap(); for(int i = 0 ; i < orders.length; i++){ HashSet set = new HashSet(); char[] charArr = orders[i].toCharArray(); Arrays.sort(charArr); String result = new String(charArr); solve(set, course, result); for(String s : set){ if(m..

알고리즘/문제 2022. 1. 9. 17:04
프로그래머스 : 다리를 지나는 트럭

Link 코딩테스트 연습 - 다리를 지나는 트럭 Code import java.util.*; class Solution { public int solution(int bridge_length, int weight, int[] truck_weights) { int answer = 0; HashMap map = new HashMap(); Queue queue = new LinkedList(); Queue queue2 = new LinkedList(); for (int i = 0; i < truck_weights.length; i++) { map.put(i,0); queue.add(truck_weights[i]); queue2.add(truck_weights[i]); } int current = 0 ; int..

알고리즘/문제 2022. 1. 9. 17:04
투포인터 (Two-Pointer)

리스트에 순차적으로 접근해야 할 때 두 개의 점의 위치를 기록하면서 처리하는 알고리즘 Two Pointers 알고리즘의 시간복잡도는 O(n) start, end라는 두 개의 포인터를 사용합니다. start는 부분배열의 앞 쪽을 가르키는 인덱스, end는 부분배열의 뒤 쪽을 가르키는 인덱스입니다. 맨 처음에 두 포인터는 0에서 시작하며 항상 start= 구해야하는 값start를 오른쪽으로 한 칸 이동하여 부분합 배열의 크기를 감소시킵니다.

알고리즘/이론 2022. 1. 9. 16:55
이전 1 2 3 4 5 다음
이전 다음
공지사항
  • DEV CHAN2
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • Spring Data
  • 비정형데이터
  • 프로그래머스 - 모의고사
  • 지연로딩
  • 투 포인터
  • Redis
  • 레디스 자료구조
  • JSX
  • http https
  • 필드 컬럼 매핑
  • Spring MVC
  • spring redis
  • GREEDY
  • 동적 계획법
  • redis 명령어
  • web.xml
  • 레디스
  • HTTP
  • HTTP 와 HTTPS 알아보기
  • 스프링 레디스
  • ORM
  • spring annotation
  • JPA에 대하여
  • nosql
  • redis자료구조
  • 즉시 로딩
  • spring boot
  • Spring
  • 스프링부트
  • spring cloud
more
«   2025/05   »
일 월 화 수 목 금 토
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 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바