일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- JavaScript
- 프로그래머스
- join
- 코플릿
- Where
- 개발자의 책장
- for문
- Hackerrank
- 블록체인
- 자바스크립트
- Algorithms
- 알고리즘
- Programmers
- 코딩공부
- 최강의 인생
- array.slice()
- 재귀함수
- Developer_JoyKim
- 정규표현식
- 코드스테이츠
- array.push()
- 코딩테스트
- 역행자
- node.js
- MySQL
- 개발자_조이킴
- SQL
- 배열
- select
- array
- Today
- Total
목록Math.max() (5)
CodingSpace
Problem. Implementation - Equalize the Array Link. https://www.hackerrank.com/challenges/equality-in-a-array/problem?isFullScreen=true Equalize the Array | HackerRank Delete a minimal number of elements from an array so that all elements of the modified array are equal to one another. www.hackerrank.com Description. Given an array of integers, determine the minimum number of elements to delete t..
Problem. Warmup - Birthday Cake Candles Link. https://www.hackerrank.com/challenges/birthday-cake-candles/problem?isFullScreen=true Plus Minus | HackerRank Calculate the fraction of positive, negative and zero values in an array. www.hackerrank.com Description. You are in charge of the cake for a child's birthday. You have decided the cake will have one candle for each year of their total age. T..
Problem. getLargestElement Description. 배열을 입력받아 가장 큰 요소를 리턴하는 함수를 작성하시오. 입력: 인자1: arr number 타입을 요소로 갖는 배열 출력: number 타입을 반환 My Answer. function getLargestElement(arr) { return Math.max(...arr); } Comments. 코드스테이츠 저작권으로 문제가 된다면 본 게시물 비공개로 처리하겠습니다! SEB IM 34기 수료생
Problem. getLargestElement Description. 배열을 입력받아 가장 큰 요소를 리턴하는 함수를 작성하시오. ※ 빈 문자열을 입력받은 경우, 빈 배열을 반환한다. 입력: 인자1: arr number 타입의 정수로 구성된 배열 출력: number 타입을 반환 My Answer. function getLargestElement(arr) { return Math.max(...arr); } Comments. 코드스테이츠 저작권으로 문제가 된다면 본 게시물 비공개로 처리하겠습니다! SEB IM 34기 수료생
Problem. removeExtremes Description. 문자열을 요소로 갖는 배열을 입력받아 가장 짧은 문자열과 가장 긴 문자열을 제거한 배열을 리턴하는 함수를 작성하시오. 입력: 인자1: arr string 타입을 요소로 갖는 배열 arr[i].length는 20 이하 출력: 배열을 반환 My Answer. function removeExtremes(arr) { // 배열 각 요소의 길이를 담은 배열 len을 생성 let len = arr.map((el) => el.length) // 배열내 요소중 최소길이 let min = Math.min(...len); // 배열내 요소중 최대길이 let max = Math.max(...len); // 최소길이와 일치하는 배열요소를 제거 for(let i..