Metadata-Version: 2.4
Name: adjacency-list-graphbuilder
Version: 0.1.0
Summary: Build an undirected adjacency-list graph from a list of edges, with automatic node-count inference.
Keywords: graph,adjacency-list,algorithms,data-structures
Author: Aniruddha Shit
Author-email: Aniruddha Shit <aniruddhashit08@gmail.com>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# graphbuilder

A tiny utility to build an undirected adjacency-list graph from a list of edges.

If you don't provide `n` (the number of nodes), it's inferred automatically
from the highest node index found in `edges`.

## Install

```bash
pip install graphbuilder
```

## Usage

```python
from graphbuilder import build_graph

edges = [[0, 1], [0, 2], [1, 2], [2, 3], [1, 3]]

# n is optional — inferred automatically
graph = build_graph(edges)
print(graph)
# [[1, 2], [0, 2, 3], [0, 1, 3], [2, 1]]

# or provide n explicitly (e.g. to include isolated nodes)
graph = build_graph(edges, n=6)
print(graph)
# [[1, 2], [0, 2, 3], [0, 1, 3], [2, 1], [], []]
```

## License

MIT
