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

Now or Never

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

Now or Never

검색하기 폼
  • 분류 전체보기 (292)
    • Java (43)
      • Java 올인원 패키지 (32)
      • Java Basic (7)
      • Java Design Pattern (1)
      • JDBC (2)
      • Java OOP (1)
    • Information (1)
    • 컴퓨터 공학(CS) (19)
      • 데이터베이스 (6)
      • 시스템 분석 및 설계 (2)
      • 운영체제 (7)
      • 네트워크 기본 정보 (4)
    • Study (49)
      • DataStructure (11)
      • TIL in Japanese (Today I Le.. (27)
      • TIL in English (Today I Lea.. (2)
      • TIL (Today I Learned) (9)
    • JSP (27)
      • 인프런 JSP (23)
      • MVC1 게시판 만들기 (4)
    • CSS (2)
      • 생활코딩 - CSS (2)
    • javaScript (8)
      • 생활코딩 - JavaScript (4)
      • Udemy - WebBootcamp (1)
      • javaScript (3)
    • DataBase (13)
      • 생활코딩 - MySQL (1)
      • 오라클 SQL (10)
      • SQL 용어 (2)
    • Spring (17)
      • 인프런 - Spring (4)
      • SpringBoot & AWS (5)
      • 패캠 - Spring (1)
      • Maven (6)
      • Spring lecture (1)
    • Algorithm (65)
      • Algorithm Practice (21)
      • Codility (6)
      • 백준 (30)
      • SWEA (2)
      • 프로그래머스 (5)
    • HTML (2)
      • 클래스라이언 웹기초 (0)
      • HTML 용어 개념 (2)
    • 리눅스 (8)
      • 리눅스 기초 (1)
      • 생활코딩 리눅스 (0)
      • Ubuntu on Windows 10 (7)
    • 생각정리 (6)
    • 토막지식시리즈 (29)
      • GraphQL 토막지식 (3)
      • javascript 토막지식 (12)
      • React 토막지식 (7)
      • DB 토막지식 (1)
      • Rxjs 토막지식 (0)
      • 삽질기록 (4)
  • 방명록

Algorithm (65)
Codility -2 CyclicRotation(Java)

Rotate an array to the right by a given number of steps. 내 코드 - 정상작동하지만 solution([], 1)에는 error를 발생시킴. - 따라서 배열의 길이가 0일때는 while문에 들어가지 않고 바로 return하는 if조건문을 초반에 삽입해야 함. - 이 코드의 문제는, 배열의 길이만큼 rotate할 때, 0번 한것과 같음에도 불구하고, 5번을 실행하기 때문에 프로그램이 길어진다는 것. class Solution { public int[] solution(int[] A, int K) { if (A.length == 0) { //solution([], 1) 일 경우 대비하기 return A; } while (K > 0) { int sto = A[0]; ..

Algorithm/Codility 2020. 3. 4. 16:40
Codility -1 Binary gap(Java)

( https://app.codility.com/programmers/lessons/1-iterations/binary_gap/ ) 10진수 N의 2진수를 확인하여, 양끝이 1로시작하고 1로 끝나는 binary gap사이에 있는 0의 갯수 구하기. A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. 내 코드 class Solution { public static int solution(int N) { int result = 0; int biCut = 0; String bi..

Algorithm/Codility 2020. 3. 3. 21:16
프로그래머스 -6 정수 내림차순으로 배치하기(Java)

문제 설명 함수 solution은 정수 n을 매개변수로 입력받습니다. n의 각 자릿수를 큰것부터 작은 순으로 정렬한 새로운 정수를 리턴해주세요. 예를들어 n이 118372면 873211을 리턴하면 됩니다. 제한 조건 n은 1이상 8000000000 이하인 자연수입니다. 입출력 예 n return 118372 873211 내코드 import java.util.Arrays; import java.util.Collections; class Solution { public long solution(long n) { long answer = 0; String s; String s2 = ""; // long to String s = String.valueOf(n); // char to int and put it i..

Algorithm/Algorithm Practice 2020. 2. 29. 00:40
프로그래머스 -5 모의고사(Java)

문제 설명 수포자는 수학을 포기한 사람의 준말입니다. 수포자 삼인방은 모의고사에 수학 문제를 전부 찍으려 합니다. 수포자는 1번 문제부터 마지막 문제까지 다음과 같이 찍습니다. 1번 수포자가 찍는 방식: 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, ... 2번 수포자가 찍는 방식: 2, 1, 2, 3, 2, 4, 2, 5, 2, 1, 2, 3, 2, 4, 2, 5, ... 3번 수포자가 찍는 방식: 3, 3, 1, 1, 2, 2, 4, 4, 5, 5, 3, 3, 1, 1, 2, 2, 4, 4, 5, 5, ... 1번 문제부터 마지막 문제까지의 정답이 순서대로 들은 배열 answers가 주어졌을 때, 가장 많은 문제를 맞힌 사람이 누구인지 배열에 담아 return 하도록 solution 함수를 작..

Algorithm/Algorithm Practice 2020. 2. 28. 14:34
이전 1 ··· 7 8 9 10 11 12 13 ··· 17 다음
이전 다음
최근에 올라온 글
최근에 달린 댓글
TAG
  • 20200420
  • 20200421
  • 20200510
  • chapter8
  • 20200804
  • likelion
  • 20200413
  • 20200319
  • 20200504
  • 20200622
  • 20200415
  • 20200427
  • 20200624
  • 20200423
  • 20200403
  • chapter7
  • 20200503
  • 생활코딩리눅스
  • 20201204
  • 20200406
  • 20200424
  • 20200502
  • 백준
  • 20200512
  • 20200317
  • 20200330
  • 20200428
  • 20200429
  • 20200425
  • 20200417
more
Total
Today
Yesterday

Blog is powered by Tistory / Designed by Tistory

티스토리툴바