Skip to content

Instantly share code, notes, and snippets.

View treblasft's full-sized avatar
🏠
Working from home

Albert Mañosa treblasft

🏠
Working from home
View GitHub Profile
@treblasft
treblasft / graphNode.md
Last active December 12, 2022 16:20
Graph Nodes in TypeScript

Graph Nodes in TypeScript

Description

In the process of implementing a basic graph system with nodes that point to other nodes (node → node) using an identifier code, we got to this simple but acceptable solution:

interface GraphNode {
  code: number;
  next: number | null;