본문 바로가기

CHIqueen

검색하기
CHIqueen
프로필사진 CHIqueen

  • 분류 전체 보기 (102)
    • 자격증 (1)
      • CPPG (1)
    • 포렌식 (46)
      • CTF (39)
      • Analysis (6)
      • 도구 (0)
      • 삽질 (1)
    • 프로그래밍 (31)
      • Python (9)
      • CodeSignal (20)
      • Golang (2)
    • 플젝 (2)
      • HWPX (2)
    • 문화생활 (18)
      • 은또영 (2)
      • 뮤지컬 (0)
      • 1일 1단편영화 (16)
Guestbook
Notice
Recent Posts
Recent Comments
Link
  • Go언어 블로그
«   2020/03   »
일 월 화 수 목 금 토
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
Tags
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록2020/03 (21)

CHIqueen

[Intro] adjacentElementsProduct

Given an array of integers, find the pair of adjacent elements that has the largest product and return that product. Example For inputArray = [3, 6, -2, -5, 7, 3], the output should be adjacentElementsProduct(inputArray) = 21. 7 and 3 produce the largest product. def adjacentElementsProduct(inputArray): return max([inputArray[i] * inputArray[i+1] for i in range(len(inputArray)-1)]) 그냥 다 곱한다음에 ma..

프로그래밍/CodeSignal 2020. 3. 3. 17:48
Prev 1 2 3 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바