(12)121. Best Time to Buy and Sell Stock

“파이썬 알고리즘 인터뷰” + https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 주어진 배열은 주식 가격의 리스트를 나타내고 한 번의 거래로 낼 수 있는 최대 이익을 찾는 문제다. 입력이 [7,1,5,3,6,4]일 경우 최대 […]

(11)238. Product of Array Except Self

“파이썬 알고리즘 인터뷰” + https://leetcode.com/problems/product-of-array-except-self/ “배열을 입력받아 output[i]가 자신을 제외한 나머지 모든 요소의 곱셈 결과가 되도록 출력하라.”는 문제이다. [1,2,3,4]가 입력인 경우, [24,12,8,6]이 정답이 된다. 여기서 […]