У нас вы можете посмотреть бесплатно DP - 18: Rod Cutting Problem | Cut the Road in pieces such that it gets Maximum Profit или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
Source Code:https://thecodingsimplified.com/rod-c... Solution: We solve it using DP Bottom up solution For every piece, either we include this or we exclude this piece to make profit To find maximum profit received for a cell, we get the maximum of both solution (including, excluding) We take 2d array to storage values & once we're done, we return the last column last row value as answer Time Complexity: O(number of pieces * rod length) Space Complexity: O(number of pieces * rod length) Do Watch video for more info CHECK OUT CODING SIMPLIFIED / codingsimplified ★☆★ VIEW THE BLOG POST: ★☆★ http://thecodingsimplified.com I started my YouTube channel, Coding Simplified, during Dec of 2015. Since then, I've published over 400+ videos. ★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★ https://www.youtube.com/codingsimplif... ★☆★ Send us mail at: ★☆★ Email: thecodingsimplified@gmail.com