Tagged articles
greedy algorithm
13 articles · Page 1 of 1
The article warns that using plain git pull can clutter commit history, recommends pull --rebase to keep a clean linear log, and then dives into the LeetCode ‘Optimal Division’ problem, explaining the greedy strategy, providing Java code, and analyzing its O(n) time and space complexity.
GitJavacommit history
0 likes · 5 min read

The article first discusses common interview pitfalls before presenting a detailed greedy solution for LeetCode problem 757—finding the smallest set that intersects each interval in at least two points—complete with problem description, algorithmic reasoning, complexity analysis, and implementations in Java, C++, Python, and TypeScript.
C++JavaLeetCode 757
0 likes · 11 min read

The article explains how to use a max‑heap together with backtracking and a greedy strategy in Python to recommend the top three attractions with the highest scores while keeping the total travel distance under 20 km, and discusses the algorithm's steps, example execution, and limitations.
HeapPythonRecommendation System
0 likes · 12 min read

The article explains a greedy interval‑based memory allocation problem, describes how to detect overlapping intervals, locate the smallest suitable free block within a 100‑byte heap, and provides a complete Python implementation that reads intervals, checks validity, and outputs the optimal allocation address.
algorithmic problemgreedy algorithminterval scheduling
0 likes · 6 min read

This article explains the greedy algorithm principle, outlines its general process, provides pseudocode, and demonstrates its application through a change‑making problem solved with a step‑by‑step example and a complete C++ implementation in detail.
algorithm designalgorithm examplechange making
0 likes · 6 min read

This article explains the greedy approach to the knapsack problem, demonstrates how to compute item value‑to‑weight ratios, selects items based on those ratios, shows a complete Java example, and discusses why the greedy method may not always yield the optimal solution.
AlgorithmJavagreedy algorithm
0 likes · 5 min read

This article explains practical techniques—pairwise testing, clustering aggregation, greedy algorithms, and fuzzy‑logic‑based reduction—to dramatically cut the number of test cases while preserving coverage and improving testing efficiency.
fuzzy logicgreedy algorithmpairwise testing
0 likes · 5 min read

This article explains a promotional bottle‑exchange problem, presents example inputs and outputs, and demonstrates two greedy‑algorithm implementations in Java that compute the maximum number of bottles one can drink when empty bottles can be exchanged for new ones.
AlgorithmLeetCodeSimulation
0 likes · 6 min read

Software testing demands efficient strategies, and this article explores four practical techniques—pairwise testing, clustering-based aggregation, greedy algorithms, and fuzzy logic—to dramatically reduce the number of test cases while maintaining coverage and improving testing speed.
fuzzy logicgreedy algorithmpairwise testing
0 likes · 5 min read

This article explains the core idea of greedy algorithms, outlines their basic workflow, identifies problem types where they apply, presents a generic greedy framework, demonstrates a fractional knapsack implementation in C++, and lists several classic greedy problems with brief solutions.
C++activity selectionalgorithm examples
0 likes · 9 min read

The article explains how recommendation systems balance exploitation and exploration, introduces diversity metrics such as temporal, spatial, and coverage, and presents a determinantal point process (DPP) based algorithm accelerated by Cholesky decomposition and greedy inference, demonstrating significant speedups and improved relevance‑diversity trade‑offs in experiments.
cholesky decompositiondeterminantal point processdiversity
0 likes · 10 min read

This article explains how a simple 20‑line multi‑armed bandit implementation can replace traditional A/B testing by continuously balancing exploration and exploitation to automatically discover the most effective UI variant, reducing manual analysis and improving conversion rates.
A/B testingExploitationexploration
0 likes · 8 min read

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
