Sport Programming - Tag
2013
-
▸
SPOJ Best Solutions for The Double Helix
Celebrates the author's Python solution being featured in SPOJ's Top 20 for The Double Helix problem. A competitive programming milestone.
-
▸
Project Euler - 15 - Lattice paths
Project Euler Problem 15 - Lattice paths. Count routes through an NxN grid moving only right and down using dynamic programming. Solution builds from bottom-right corner.
-
▸
Project Euler - 14 - Longest Collatz sequence - memoization
Project Euler Problem 14 - Longest Collatz sequence. Demonstrates memoization to dramatically speed up computing chain lengths for the Collatz conjecture.
-
▸
Project Euler - Problem 5 - Smallest multiple
Project Euler Problem 5 - Smallest Multiple. Finds the smallest number divisible by all numbers 1-20. Compares brute force approach to optimized LCM-based solution using GCD.
-
▸
Project Euler - Problem 18, Problem 67 - Maximum path sum
Project Euler problems 18 and 67 - Maximum path sum. Classic DP problem: find the maximum sum from top to bottom of a triangular number pyramid by propagating maximums upward.
-
▸
Google Code Jam 2013 - Round 1B - Osmos
Google Code Jam 2013 Round 1B Osmos problem solution. Uses greedy algorithm with the ability to grow (add to your size) or remove enemies to find minimum changes needed.
-
▸
Python equivalent of C's freopen
Shows how to redirect stdin and stdout in Python to work with files, similar to C's freopen(). Enables automating interactive programs in competitive programming.
-
▸
SPOJ - ACODE - AlphaCode
SPOJ ACODE - AlphaCode. Counts possible decodings of a numeric string where 1=A, 2=B, ..., 26=Z using dynamic programming. Handles single and double digit interpretations.
-
▸
Timus - 1018 - Binary Apple Tree - Dynamic Programming
Timus problem 1018 - Binary Apple Tree. Uses dynamic programming to determine which branches to keep to maximize apples collected when only Q branches can be retained.
-
▸
UVa 11259 - Coin Changing Again
UVa 11259 - Coin Changing Again. Uses top-down dynamic programming with state encoding to find all possible ways to make change with limited coin counts. Includes solution with memoization.
-
▸
Number of ways to change making (Dynamic Programming)
A variant of the change making problem that counts the number of distinct ways to make change for a given amount using dynamic programming with coin denominations.
-
▸
Change Making (Dynamic Programming) Problem
Classic dynamic programming problem to find the minimum number of coins needed to make a given change. Uses a bottom-up approach with sorted denominations to compute optimal solution.
2012
-
▸
Next Palindrome after a 1000000 digit number - SPOJ - PALIN
A classic SPOJ problem requiring string manipulation to find the smallest palindrome greater than a given number with up to 1 million digits. Explains the algorithm approach using string reflection and handling edge cases like all-9s numbers.
-
▸
Infix Expression to Postfix (RPN) Expression Conversion - SPOJ - ONP
SPOJ problem ONP - Transform algebraic expressions with brackets into Reverse Polish Notation (RPN). Uses a stack-based algorithm to convert infix expressions to postfix for easier evaluation.
-
▸
Prime Numbers and Basic Primality Tests - SPOJ - Prime1
Covers multiple algorithms for testing primality - from basic O(n) trial division to optimized approaches checking only up to square root, and skipping even numbers after 2.