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

하늘리 개발일기

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

하늘리 개발일기

검색하기 폼
  • 분류 전체보기 (138)
    • [코테] (133)
      • [Programmers Lv1] (43)
      • [Programmers Lv2] (19)
      • [GroomEdu] (61)
      • [Programmers] (0)
      • [YBM-sample] (10)
    • [Android] (1)
      • 이론 (0)
      • Kotlin (0)
      • JAVA (0)
    • [반성문] (1)
    • [클론코딩] (1)
    • [React-Node.js] (0)
  • 방명록

배열 (3)
[Programmers] Lv1_같은 숫자는 싫어 (JAVA)

💻JAVA 코드 바로보기 □문제 설명 배열 arr가 주어집니다. 배열 arr의 각 원소는 숫자 0부터 9까지로 이루어져 있습니다. 이때, 배열 arr에서 연속적으로 나타나는 숫자는 하나만 남기고 전부 제거하려고 합니다. 단, 제거된 후 남은 수들을 반환할 때는 배열 arr의 원소들의 순서를 유지해야 합니다. 예를 들면, arr = [1, 1, 3, 3, 0, 1, 1] 이면 [1, 3, 0, 1] 을 return 합니다. arr = [4, 4, 4, 3, 3] 이면 [4, 3] 을 return 합니다. 배열 arr에서 연속적으로 나타나는 숫자는 제거하고 남은 수들을 return 하는 solution 함수를 완성해 주세요. □제한사항 배열 arr의 크기 : 1,000,000 이하의 자연수 배열 arr의 원..

[코테]/[Programmers Lv1] 2021. 7. 16. 13:22
[COS PRO 2급] 6차 1번_저는 따뜻한 날이 좋아요 (C/C++)

주어진 코드 #include #include #include int solution(int temperature[], int temperature_len, int A, int B) { int answer = 0; //빈칸 return answer; } int main() { int temperature[] = { 3, 2, 1, 5, 4, 3, 3, 2 }; int temperature_len = 8; int A = 1; int B = 6; int ret = solution(temperature, temperature_len, A, B); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(..

[코테]/[GroomEdu] 2021. 5. 28. 18:00
[COS PRO 2급] 4차 9번_위험한 지역 몇개인지 알려주기 (C/C++)

주어진 코드 #include #include #include int solution(int height[][4], int height_len) { int count = 0; //빈칸 return count; } int main() { int height[4][4] = { {3, 6, 2, 8}, {7, 3, 4, 2}, {8, 6, 7, 3}, {5, 3, 2, 9} }; int height_len = 4; int ret = solution(height, height_len = 4); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(int height[][4], int height_len..

[코테]/[GroomEdu] 2021. 5. 22. 16:00
이전 1 다음
이전 다음
공지사항
  • About Me
최근에 올라온 글
TAG
  • COSPRO 2급
  • 배열활용문제
  • lv2
  • 구름에듀
  • cospro기출문제
  • lv1
  • 알고리즘
  • 자바
  • cospro기출
  • YBM
  • 코딩테스트
  • C
  • groomedu
  • 구름 기출문제
  • 코스프로
  • YBM기출
  • 프로그래머스
  • c언어 기출문제
  • 연습문제
  • c언어
  • CosPro
  • Java
  • groom
  • 기출문제
  • 1급
  • 구름에듀 기출문제
  • 배열
  • Cos Pro
  • C++
  • programmers
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

티스토리툴바