{% extends "base.html" %} {% block title %}Dynamic Programming | USSU Algorithm Analyzer v4.0 {% if result %}

🧩 DP Process Analysis

Problem Setup

{{ result.algorithm }} — Time: {{ result.time_complexity }}, Space: {{ result.space_complexity }}

Table Computation

{{ result.iterations }} iterations, {{ result.comparisons }} comparisons. DP table built bottom-up with optimal substructure.

Optimal Solution

Result computed in {{ "%.4f"|format(result.execution_time_ms) }}ms via memoization and reconstruction.

{% endif %} {% endblock %} {% block content %}

Select Problem

Problem Info

0/1 Knapsack

O(n × W) O(n × W) Space

Select items to maximize value without exceeding weight capacity. Each item can be taken once.

{% if result %}

Result

Algorithm
{{ result.algorithm }}
Time (ms)
{{ "%.4f"|format(result.execution_time_ms) }}
Memory
{{ "%.2f"|format(result.memory_used_kb) }} KB
Iterations
{{ result.iterations }}
Comparisons
{{ result.comparisons }}
Time Complexity
{{ result.time_complexity }}
Space Complexity
{{ result.space_complexity }}
Time (ms)
{{ "%.4f"|format(result.execution_time_ms) }}
Iterations
{{ result.iterations }}
Comparisons
{{ result.comparisons }}
{% if result.max_value is defined %}Max Value: {{ result.max_value }}
{% endif %} {% if result.selected_items is defined %}Selected Items: {{ result.selected_items }}
{% endif %} {% if result.length is defined %}Length: {{ result.length }}
{% endif %} {% if result.subsequence is defined %}Subsequence: {{ result.subsequence }}
{% endif %} {% if result.distance is defined %}Distance: {{ result.distance }}
{% endif %} {% if result.min_coins is defined %}Min Coins: {{ result.min_coins }}
{% endif %} {% if result.coins_used is defined %}Coins Used: {{ result.coins_used }}
{% endif %} {% if result.ways is defined %}Ways: {{ result.ways }}
{% endif %} {% if result.min_multiplications is defined %}Min Ops: {{ result.min_multiplications }}
{% endif %} {% if result.optimal_parenthesization is defined %}Parenthesization: {{ result.optimal_parenthesization }}
{% endif %}
{% endif %} {% if dp_img %}

DP Table Heatmap

{% endif %} {% if result %}

🧩 DP Process Analysis

Problem Setup

{{ result.algorithm }} — Time: {{ result.time_complexity }}, Space: {{ result.space_complexity }}

Table Computation

{{ result.iterations }} iterations, {{ result.comparisons }} comparisons. DP table built bottom-up with optimal substructure.

Optimal Solution

Result computed in {{ "%.4f"|format(result.execution_time_ms) }}ms via memoization and reconstruction.

{% endif %} {% endblock %} {% block extra_scripts %} {% if result %}

🧩 DP Process Analysis

Problem Setup

{{ result.algorithm }} — Time: {{ result.time_complexity }}, Space: {{ result.space_complexity }}

Table Computation

{{ result.iterations }} iterations, {{ result.comparisons }} comparisons. DP table built bottom-up with optimal substructure.

Optimal Solution

Result computed in {{ "%.4f"|format(result.execution_time_ms) }}ms via memoization and reconstruction.

{% endif %} {% endblock %}