---
title: "Discussion on \"How Many Edges Does an N × M Grid Really Have?\" | Hashnode"
description: "Discussion on \"How Many Edges Does an N × M Grid Really Have?\". While studying BFS/DFS on grids, I came across a question that initially looked trivial:\n\nIf every cell in an N × M grid is a vertex, and every shared boundary between two cells is an edge, how many e"
url: "https://hashnode.com/posts/deriving-number-of-edges-in-n-m-grid/6a9452f58c4c8b6b6b2ca106"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How Many Edges Does an N × M Grid Really Have?](https://prakhargupta.hashnode.dev/deriving-number-of-edges-in-n-m-grid?utm_source=hashnode&utm_medium=feed)

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 e

Aug 30 · 5 min read · prakhargupta.hashnode.dev  
Read the article

## Written by

[Prakhar Gupta](https://hashnode.com/@prakkkkhar)

@prakkkkhar · Mumbai, India

  
[View profile](https://hashnode.com/@prakkkkhar)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
