Efficient Algorithms for Range Queries, Matrix Exponentiation, Trie DFS, and Subset Sum with Modular Arithmetic

Problem T1: Maximum Cross-Shaped Area in a Grid Given a binary grid where '.' represents a valid cell and other characters are blocked, compute the largest cross-shaped region centered at any valid cell. A cross is defined by a vertical segment of height h and a horizontal segment of width w, both centered at the same point, with the total peri ...

Posted on Wed, 26 Aug 2026 16:40:14 +0000 by ricerocket

Bidirectional Search Strategies: BFS Optimization and Meet-in-the-Middle Techniques

Bidirectional search techniques optimize exhaustive searches by simultaneously exploring from both the initial state and target state, or by splitting the search space into manageable halves. These approaches significantly reduce the branching factor and memory requirements compared to unidirectional methods. Bidirectional BFS for Shortest Path ...

Posted on Wed, 24 Jun 2026 17:41:35 +0000 by santopernola