Tag

knapsack problem

1 views collected around this technical thread.

IT Services Circle
IT Services Circle
Feb 1, 2025 · Fundamentals

Understanding Dynamic Programming through Staircase and Knapsack Examples

This article walks through the fundamentals of dynamic programming by illustrating how to solve a staircase climbing problem and a 0/1 knapsack problem, explaining optimal substructure, state transition equations, boundary conditions, and providing both recursive and iterative C++ implementations.

Dynamic Programmingalgorithmknapsack problem
0 likes · 12 min read
Understanding Dynamic Programming through Staircase and Knapsack Examples
Qunar Tech Salon
Qunar Tech Salon
Apr 4, 2015 · Fundamentals

Greedy Algorithm: Concepts, Basic Approach, Applicability, and Example Analysis

This article explains the fundamental concepts of greedy algorithms, outlines their basic design steps, discusses the conditions under which they yield optimal solutions, presents an implementation framework, and analyzes a knapsack problem example that illustrates common greedy strategies and their limitations.

algorithm analysisgreedy algorithmknapsack problem
0 likes · 6 min read
Greedy Algorithm: Concepts, Basic Approach, Applicability, and Example Analysis