Jev Log

고정 헤더 영역

글 제목

메뉴 레이어

Jev Log

메뉴 리스트

  • 홈
  • 방명록
  • 분류 전체보기 (68)
    • Development (68)
      • PHP (2)
      • Apache (2)
      • Tomcat (1)
      • Linux (4)
      • Elastic Search(엘라스틱서치) (4)
      • Java (3)
      • JavaScript (7)
      • Spring (11)
      • ASP (1)
      • Oracle (1)
      • MY-SQL (1)
      • Vue JS (0)
      • 쿠버네티스 (2)
      • AWS (3)
      • 테라폼 (9)
      • ETC (4)
      • 하이퍼레저 패브릭 (4)
      • 알고리즘 (9)

검색 레이어

Jev Log

검색 영역

컨텐츠 검색

cyclicRotation

  • [Codility]CyclicRotation

    2020.06.27 by J-Developer

[Codility]CyclicRotation

[문제] [답안작성] class Solution { public int[] solution(int[] A, int K) { if( A.length == K || A.length == 1 || A.length == 0 ) { return A; } int temp = 0; for( int i = 0; i < K; i++ ) { for( int j = 0; j < A.length; j++ ) { int t = 0; if( j == A.length - 1 ) { A[0] = A[j]; A[j] = temp; } else { t = A[j]; A[j] = temp; temp = t; } } } return A; } }

Development/알고리즘 2020. 6. 27. 17:10

추가 정보

인기글

최신글

페이징

이전
1
다음
TISTORY
Jev Log © Magazine Lab
페이스북 트위터 인스타그램 유투브 메일

티스토리툴바