Tag

dynamic programming

1 views collected around this technical thread.

IT Services Circle
IT Services Circle
Jun 3, 2025 · Fundamentals

LeetCode 764 – Order of Largest Plus Sign: Problem Explanation and Multi‑Language Solutions

This article presents the LeetCode 764 problem of finding the largest axis‑aligned plus sign in a binary grid, explains the preprocessing and simulation approach using four directional prefix arrays, analyzes time and space complexity, and provides complete Java, C++, Python, and TypeScript implementations.

JavaLeetCodePython
0 likes · 12 min read
LeetCode 764 – Order of Largest Plus Sign: Problem Explanation and Multi‑Language Solutions
Java Tech Enthusiast
Java Tech Enthusiast
Apr 6, 2025 · Fundamentals

Git Rebase vs Merge and Number-to-String Translation Using Dynamic Programming

The article compares git rebase and git merge—explaining that merge preserves history with extra commits while rebase creates a linear log but rewrites public history—then presents a dynamic‑programming solution for translating a numeric string to letters, using dp[i]=dp[i‑1]+dp[i‑2] when the two‑digit slice is between 10 and 25, achieving O(n) time.

algorithmdynamic programminggit
0 likes · 6 min read
Git Rebase vs Merge and Number-to-String Translation Using Dynamic Programming
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.

algorithmdynamic programmingknapsack problem
0 likes · 12 min read
Understanding Dynamic Programming through Staircase and Knapsack Examples
Python Programming Learning Circle
Python Programming Learning Circle
Jan 13, 2025 · Fundamentals

Python Interview Coding Problems: List Index Matching, Tree Traversal, and Minimum Path Sum Solutions

This article shares personal reflections on a recent interview and provides detailed Python solutions for three classic coding challenges—a list index extraction using hash maps, a tree traversal reconstruction based on parent IDs, and a dynamic‑programming approach to the minimum path sum problem, along with code snippets.

AlgorithmsData StructuresInterview
0 likes · 6 min read
Python Interview Coding Problems: List Index Matching, Tree Traversal, and Minimum Path Sum Solutions
IT Services Circle
IT Services Circle
Jan 13, 2025 · Fundamentals

Longest Palindromic Substring – DP Solution and Java/C++ Implementations

The article first shares a personal anecdote about job background checks and then presents a detailed explanation of LeetCode problem 5 – Longest Palindromic Substring – including problem description, dynamic‑programming analysis, recurrence formula, and complete Java and C++ code examples.

C++DPJava
0 likes · 8 min read
Longest Palindromic Substring – DP Solution and Java/C++ Implementations
Test Development Learning Exchange
Test Development Learning Exchange
Jan 6, 2025 · Fundamentals

Python Introspection: Exploring Object Structure and Dynamic Programming

Python introspection allows programs to examine their own structure at runtime, enabling dynamic manipulation of objects, classes, and methods through built-in functions and modules.

MetaclassesPythonattribute-access
0 likes · 5 min read
Python Introspection: Exploring Object Structure and Dynamic Programming
DaTaobao Tech
DaTaobao Tech
Apr 24, 2024 · Fundamentals

Comprehensive Collection of Algorithm Templates and Code Snippets for LeetCode

This guide compiles essential Python built‑in functions, data‑structure utilities, and ready‑to‑use algorithmic templates—including dynamic programming, backtracking with caching, binary search, bit manipulation, union‑find, topological sort, monotonic stack, sliding window, prefix sums, two‑pointer and graph traversals—to accelerate LeetCode problem solving.

Data StructuresLeetCodePython
0 likes · 25 min read
Comprehensive Collection of Algorithm Templates and Code Snippets for LeetCode
Python Programming Learning Circle
Python Programming Learning Circle
Jan 25, 2024 · Fundamentals

Dynamic Programming Solution for the Gold Mining (Knapsack) Problem

This article explains how to model a gold mining selection problem as a 0/1 knapsack, uses dynamic programming to compute the optimal set of mines given worker constraints, provides a full Python implementation, and demonstrates that the maximum extractable gold is 900 kg by choosing the first two mines.

algorithmdynamic programmingknapsack
0 likes · 12 min read
Dynamic Programming Solution for the Gold Mining (Knapsack) Problem
IT Services Circle
IT Services Circle
Sep 22, 2023 · Fundamentals

Overview of Common Data Structures and Algorithms

This article reviews essential data structures such as arrays, linked lists, stacks, queues, hash tables, and trees, explains their characteristics and trade‑offs, and introduces fundamental algorithm categories including sorting, searching, greedy, divide‑and‑conquer, and dynamic programming, with useful visualization links.

AlgorithmsData StructuresLinked List
0 likes · 8 min read
Overview of Common Data Structures and Algorithms
Model Perspective
Model Perspective
Mar 8, 2023 · Fundamentals

Dynamic Programming Demystified: Python Knapsack & Shortest Path

This article introduces the core concepts of dynamic programming, explains its principles of breaking problems into subproblems with optimal substructure, and provides step‑by‑step Python implementations for the classic knapsack optimization and a shortest‑path graph algorithm, complete with illustrative code and visualizations.

Pythonalgorithmdynamic programming
0 likes · 10 min read
Dynamic Programming Demystified: Python Knapsack & Shortest Path
Python Programming Learning Circle
Python Programming Learning Circle
Dec 17, 2022 · Fundamentals

Accelerating Python Code with Taichi: Prime Counting, LCS, and Reaction‑Diffusion Examples

This article demonstrates how importing the Taichi library into Python can dramatically accelerate compute‑intensive tasks, showcasing prime counting, longest common subsequence, and reaction‑diffusion simulations with speedups up to 120× and GPU support, while providing installation and usage guidance.

GPUHigh Performance ComputingPython
0 likes · 6 min read
Accelerating Python Code with Taichi: Prime Counting, LCS, and Reaction‑Diffusion Examples
Tencent Cloud Developer
Tencent Cloud Developer
Nov 18, 2022 · Databases

How CDW PG Optimizer Finds Optimal Join Order for Multi-Table Queries

CDW PG’s optimizer determines the most efficient join order for multi‑table OLAP queries by combining bottom‑up dynamic programming for smaller joins with a genetic algorithm for larger ones, while jointly selecting scan paths, join algorithms, and data‑distribution strategies to minimize execution cost.

CDW PGDistributed DatabaseJoin Optimization
0 likes · 9 min read
How CDW PG Optimizer Finds Optimal Join Order for Multi-Table Queries
DataFunSummit
DataFunSummit
Apr 25, 2022 · Artificial Intelligence

Token‑Level Pipeline Parallelism for Transformer‑based Language Models (TeraPipe)

The article introduces a token‑level pipeline parallelism strategy that splits the sequence‑length dimension of Transformer‑based language models, explains why this approach is feasible, presents a dynamic‑programming formulation for optimal slicing, discusses engineering challenges, and evaluates its performance on large GPT models.

Performance OptimizationToken-levelTransformer
0 likes · 13 min read
Token‑Level Pipeline Parallelism for Transformer‑based Language Models (TeraPipe)
FunTester
FunTester
Oct 22, 2021 · Backend Development

Using Groovy MetaClass to Dynamically Add Methods and Properties to Classes and Objects

This article demonstrates how Groovy's MetaClass can be used at runtime to add object methods, static methods, and properties to classes, and includes a complete Spock unit‑test example that verifies dynamic behavior with detailed code snippets and console output.

GroovySpockdynamic programming
0 likes · 7 min read
Using Groovy MetaClass to Dynamically Add Methods and Properties to Classes and Objects
Full-Stack Internet Architecture
Full-Stack Internet Architecture
May 21, 2021 · Fundamentals

Nim Game: Problem Statement, Analysis, Solution, and Proof

This article explains the classic Nim game where two players alternately remove 1‑3 stones from a pile, presents the LeetCode‑style problem of determining if the first player can force a win, analyzes the pattern of losing positions, provides a concise Go solution, and offers a formal proof based on game theory.

Nimalgorithmdynamic programming
0 likes · 5 min read
Nim Game: Problem Statement, Analysis, Solution, and Proof
Sohu Tech Products
Sohu Tech Products
May 12, 2021 · Mobile Development

Understanding Diff Algorithms and Batch Updates in UICollectionView (iOS)

This article explains the concept of diff algorithms, demonstrates how to perform partial updates in iOS UICollectionView using insert, delete, reload and move APIs, introduces edit paths and the Wagner–Fischer dynamic‑programming algorithm, and provides Swift code examples for calculating optimal edit steps.

Batch UpdatesDiff AlgorithmSwift
0 likes · 12 min read
Understanding Diff Algorithms and Batch Updates in UICollectionView (iOS)