Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DSA
  • Practice Problems
  • Python
  • C
  • C++
  • Java
  • Courses
  • Machine Learning
  • DevOps
  • Web Development
  • System Design
  • Aptitude
  • Projects
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Sorting
1.7k+ articles
Dynamic Programming
1.5k+ articles
Recursion
1k+ articles
Google
370+ articles
Branch and Bound
18 articles

knapsack

40 posts
Introduction to Knapsack Problem, its Types and How to solve them
Last Updated: 01 October 2024
The Knapsack problem is an example of the combinational optimization problem. This problem is also commonly known as the "Rucksack Problem". ...read more
Algorithms
knapsack
DSA
C++ Program for the Fractional Knapsack Problem
Last Updated: 19 July 2020
Pre-requisite: Fractional Knapsack ProblemGiven two arrays weight[] and profit[] the weights and profit of N items, we need to put these ite ...read more
Greedy
Competitive Programming
STL
knapsack
Greedy Algorithms
C++ Programs
Fraction
DSA
0/1 Knapsack using Least Cost Branch and Bound
Last Updated: 09 January 2024
Given N items with weights W[0..n-1], values V[0..n-1] and a knapsack with capacity C, select the items such that:  The sum of weights tak...read more
image
Algorithms
Dynamic Programming
Sorting
Heap
Branch and Bound
knapsack
priority-queue
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Greedy
2k+ articles
Algorithms
2k+ articles
Sorting
1.7k+ articles
Dynamic Programming
1.5k+ articles
Recursion
1k+ articles
Google
370+ articles
Branch and Bound
18+ articles
Greedy Approach vs Dynamic programming
Last Updated: 23 April 2024
Greedy approach and Dynamic programming are two different algorithmic approaches that can be used to solve optimization problems. Here are t ...read more
Dynamic Programming
Greedy
knapsack
Difference Between
DSA
Printing Items in 0/1 Knapsack
Last Updated: 23 June 2022
Given weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In other wo...read more
image
Dynamic Programming
Backtracking
knapsack
DSA
Unbounded Knapsack (Repetition of items allowed)
Last Updated: 15 November 2024
Given a knapsack weight, say capacity and a set of n items with certain value vali and weight wti, The task is to fill the knapsack in such ...read more
Amazon
Google
Dynamic Programming
knapsack
DSA
A Space Optimized DP solution for 0-1 Knapsack Problem
Last Updated: 24 April 2023
Given the weights and values of n items, put these items in a knapsack of capacity W to get the maximum total value in the knapsack. In othe ...read more
Dynamic Programming
knapsack
DSA
Target Sum
Last Updated: 13 November 2023
Given an array arr[] of length N and an integer target. You want to build an expression out of arr[] by adding one of the symbols '+' and '- ...read more
Algorithms
knapsack
DSA
Implementation of 0/1 Knapsack using Branch and Bound
Last Updated: 23 November 2023
Given two arrays v[] and w[] that represent values and weights associated with n items respectively. Find out the maximum value subset(Maxim...read more
image
Branch and Bound
knapsack
DSA
0/1 Knapsack using Branch and Bound
Last Updated: 09 July 2024
Given two arrays v[] and w[] that represent values and weights associated with n items respectively. Find out the maximum value subset(Maxim...read more
image
Arrays
Branch and Bound
knapsack
DSA
Fractional Knapsack Problem
Last Updated: 20 April 2025
Given two arrays,val[]andwt[], representing the values and weights of items, and an integercapacityrepresenting the maximum weight a knapsac ...read more
Greedy
knapsack
Fraction
DSA
Pseudo-polynomial Algorithms
Last Updated: 22 August 2021
What is a pseudo-polynomial algorithm?A pseudo-polynomial algorithm is an algorithm whose worst-case time complexity is polynomial in the nu ...read more
Analysis of Algorithms
knapsack
DSA
0/1 Knapsack Problem
Last Updated: 12 March 2025
Given n items where each item has some weight and profit associated with it and also given a bag with capacity W, [i.e., the bag can hold at...read more
image
Snapdeal
Zoho
MakeMyTrip
Visa
Dynamic Programming
knapsack
DSA
Java Program 0-1 Knapsack Problem
Last Updated: 09 November 2023
Write a Java program for a givenNitems where each item has some weight and profit associated with it and also given a bag with capacityW, [i ...read more
knapsack
Java Programs
Python Program for 0-1 Knapsack Problem
Last Updated: 09 November 2023
Write a Python program for a givenNitems where each item has some weight and profit associated with it and also given a bag with capacityW, ...read more
knapsack
Python Programs
1 2 3 >>
Last
1 2 3 >>
Last
1 2 3 >>
Last
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox