Devlog

  • 홈
  • 태그
  • 방명록

programmers 1

알고리즘 Programmers 정렬 Level 2 [H-index] / javascript

H index Programmers 정렬 Level 2 중 H-index 알고리즘 문제를 풀었습니다. 입출력 예와 설명을 듣고 해석하면, 논문이 인용된 횟수인 citations 를 순회하면서 h 번 이상 인용된 논문이 h 개보다 같거나 많을 경우를 의미 그 값 중 최대값을 의미한다고 해석했습니다. function solution(citations) { for (let i = citations.length; i >= 0; i--) { const citationElement = citations.filter((element) => element >= i).length; if (citationElement >= i) { return i; } } } 기준을 citations 배열의 length 로 두고 싶었기에..

알고리즘 2022.03.13
이전
1
다음
더보기
프로필사진

Devlog

  • 분류 전체보기 (18)
    • react (2)
    • javascript (0)
    • seo (0)
    • flutter (5)
    • python (6)
    • 공공데이터 (1)
    • 알고리즘 (1)
    • typescript (1)
    • machine-learning (1)
    • 디자인 (0)

Tag

No supported devices connected, One or more plugins require a higher Android SDK version, airbnb_redesign_ui, React dev Tool, Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01, flutter_native_splash, H-Index, Google Login, React conf 2021, 의약품개요정보(e약은요), 태그된 유니온, Refactoring UI, effective typescript, react, JavaScript, Flutter, Google 로그인 구현, Apple Silicon M1, Your Flutter application is created using an older version of the Android embedding, Error: android:exported needs to be explicitly specified for <activity>,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

Copyright © Kakao Corp. All rights reserved.

티스토리툴바