PGPrakhar Guptainprakhargupta.hashnode.dev·Aug 30 · 5 min readHow Many Edges Does an N × M Grid Really Have?While studying BFS/DFS on grids, I came across a question that initially looked trivial: If every cell in an N × M grid is a vertex, and every shared boundary between two cells is an edge, how many e00
PGPrakhar Guptainprakhargupta.hashnode.dev·Jul 9 · 33 min readDP on Strings: A Competitive Programmer's GuideString DP is one of the most frequently tested Dynamic Programming topics in Competitive Programming. Although the problems may look different most of them are built on a small number of recurring pat00