ycliper

Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
Скачать

0/1 Knapsack Problem Using Dynamic Programming - Tutorial & Source Code

Algorithm

Code

pseudo code

knapsack

puzzle

01 knapsack

0/1 knapsack problem

dynamic programming

Автор: Stable Sort

Загружено: 2019-12-09

Просмотров: 14276

Описание: 01 Knapsack Problem defined and explained. In this tutorial we explain why a greedy rule does not work and present a dynamic programming algorithm that fills out a table. The running time complexity of the dynamic programming algorithm is pseudo-polynomial, not quadratic, even though the table is two dimensional. Understanding the running time complexity gives a sense of why this problem is hard and why it's called "weakly NP-complete".

Source code of minimal implementation in JavaScript:
https://bitbucket.org/StableSort/play...

Source code implementation in Java:
https://bitbucket.org/StableSort/play...

Wikipedia: https://en.wikipedia.org/wiki/Knapsac...

Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most valuable items.

Weak NP-completeness: https://en.wikipedia.org/wiki/Weak_NP...

This is a common problem that is given during coding interviews in engineering firms such as Google and Microsoft.

Written and narrated by Andre Violentyev

Не удается загрузить Youtube-плеер. Проверьте блокировку Youtube в вашей сети.
Повторяем попытку...
0/1 Knapsack Problem Using Dynamic Programming - Tutorial & Source Code

Поделиться в:

Доступные форматы для скачивания:

Скачать видео

  • Информация по загрузке:

Скачать аудио

Похожие видео

© 2025 ycliper. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]