Content Repo 41

DP Maximum Score from Performing Multiplication Operations[동적 프로그래밍]

Initially when you read the question.What first came to mind could be using "Two Heaps" approach. How would Two Heaps work? If the numbers and the multipliers are kept in two maximum heap and we continuously poll(remove) from the heaps we can perform multiplication operations until the heaps of numbers is multipliers is empty. public int maximumScoreTwoHeaps(int[] nums, int[] multipliers) { Prio..

Algorithm 2022.09.16
반응형