| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- codesingal
- flask
- All Longest Strings
- Counting cells in a blob
- baekjun
- 2015 봄학기 알고리즘
- til
- adjacentElementsProduct
- recursion
- Python
- markdown
- almostIncreasingSequence
- codesignal
- 수 정렬하기
- cpp
- 백준
- Daily Commit
- C++
- 2750
- data_structure
- centuryFromYear
- Numpy
- shapeArea
- 파이썬 포렌식
- collections.deque
- 파이썬머신러닝완벽가이드
- 피보나치 수
- matrixElementsSum
- 10953
- Sequential Search
Archives
- Today
- Total
목록adjacentElementsProduct 1
Introfor
[Intro] adjacentElementsProduct
Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. 주어진 정수 배열에서, 곱이 가장 큰 인접한 요소쌍을 찾아서 곱의 값을 반환한다. def adjacentElementsProduct(inputArray): return max([inputArray[i] * inputArray[i + 1] for i in range(len(inputArray) - 1)]) 각각의 인접한 요소쌍의 곱의 값들을 리스트에 저장하고, max()를 통해 최댓값을 구하여 반환한다.
Programming_prob/Codesignal
2020. 7. 18. 14:51