CS Theory

Poj 3262 Protecting the Flowers

Solution to POJ 3262 Protecting the Flowers using greedy algorithm. The problem involves minimizing the total damage by optimally ordering flower protection tasks based on time and damage rates.

July 11, 2018

POJ 1017 Packets

POJ 1017 Packets

Solution to POJ 1017 Packets problem using greedy algorithm. This classic packing problem involves optimally arranging packets of different sizes into minimum number of containers with size constraints.

July 10, 2018

poj 3040 Allowance

POJ 3040 Allowance problem solution using greedy algorithm. This classic greedy problem involves optimizing coin usage to maximize weekly allowances by strategically selecting coins of different denominations.

July 10, 2018

poj 1979 Red and Black

Solution to POJ 1979 Red and Black problem using depth first search algorithm. Complete C++ implementation with DFS traversal to count reachable black tiles from starting position.

June 28, 2018

LeetCode Solution: Manacher's Algorithm for Longest Palindromic String

Manacher's algorithm also known as马拉车algorithm is an efficient solution that reduces the time complexity of finding the longest palindromic substring to O(N). This article explains the core concepts including preprocessing with special characters handling odd and even length palindromes and implementing symmetry optimization in Go.

April 17, 2018

Distributed System Fundamentals

Learn the core concepts of Distributed System including storage, communication, and computation challenges. Understand scalability, performance, availability, and fault tolerance principles with partitioning and replication strategies.

April 6, 2018

Zero-Swap Sorting Google Interview Question

Google interview question about sorting an array using only swaps with zero element. Given an array of length n containing numbers 0 to n-1 in random order, sort it by swapping zero with other elements only.

March 29, 2018