From b03227caaa8d69bc0b869bf8acf1aaafda240afd Mon Sep 17 00:00:00 2001 From: thutasann Date: Sun, 8 Sep 2024 13:29:04 +0800 Subject: [PATCH] chore: folder strcut change --- .../graph/adjacency-list/flight-routes-sample.ts | 0 .../graph/adjacency-list/index.ts | 0 .../{ => data-structures}/graph/dfs/dfs-graph.ts | 0 .../{ => data-structures}/graph/dfs/dfs-maze.ts | 0 .../src/{ => data-structures}/graph/dfs/dfs.ts | 0 .../graph/flight-graph-sample.ts | 0 .../{ => data-structures}/graph/graph-sample.ts | 0 .../graph/traversal/decision-traversal.ts | 0 .../graph/traversal/dom-traversal.html | 0 .../graph/traversal/expression-evaluation.ts | 0 .../graph/traversal/file-node-traversal.ts | 0 .../graph/traversal/network-routing-traversal.ts | 0 .../graph/traversal/tree-traversal.ts | 0 .../leetcodes/src/reverse-linked-list/index.ts | 16 +++++++++++++++- 14 files changed, 15 insertions(+), 1 deletion(-) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/adjacency-list/flight-routes-sample.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/adjacency-list/index.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/dfs/dfs-graph.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/dfs/dfs-maze.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/dfs/dfs.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/flight-graph-sample.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/graph-sample.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/decision-traversal.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/dom-traversal.html (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/expression-evaluation.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/file-node-traversal.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/network-routing-traversal.ts (100%) rename node-concepts/src/leetcodes/src/{ => data-structures}/graph/traversal/tree-traversal.ts (100%) diff --git a/node-concepts/src/leetcodes/src/graph/adjacency-list/flight-routes-sample.ts b/node-concepts/src/leetcodes/src/data-structures/graph/adjacency-list/flight-routes-sample.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/adjacency-list/flight-routes-sample.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/adjacency-list/flight-routes-sample.ts diff --git a/node-concepts/src/leetcodes/src/graph/adjacency-list/index.ts b/node-concepts/src/leetcodes/src/data-structures/graph/adjacency-list/index.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/adjacency-list/index.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/adjacency-list/index.ts diff --git a/node-concepts/src/leetcodes/src/graph/dfs/dfs-graph.ts b/node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs-graph.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/dfs/dfs-graph.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs-graph.ts diff --git a/node-concepts/src/leetcodes/src/graph/dfs/dfs-maze.ts b/node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs-maze.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/dfs/dfs-maze.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs-maze.ts diff --git a/node-concepts/src/leetcodes/src/graph/dfs/dfs.ts b/node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/dfs/dfs.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/dfs/dfs.ts diff --git a/node-concepts/src/leetcodes/src/graph/flight-graph-sample.ts b/node-concepts/src/leetcodes/src/data-structures/graph/flight-graph-sample.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/flight-graph-sample.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/flight-graph-sample.ts diff --git a/node-concepts/src/leetcodes/src/graph/graph-sample.ts b/node-concepts/src/leetcodes/src/data-structures/graph/graph-sample.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/graph-sample.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/graph-sample.ts diff --git a/node-concepts/src/leetcodes/src/graph/traversal/decision-traversal.ts b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/decision-traversal.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/decision-traversal.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/decision-traversal.ts diff --git a/node-concepts/src/leetcodes/src/graph/traversal/dom-traversal.html b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/dom-traversal.html similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/dom-traversal.html rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/dom-traversal.html diff --git a/node-concepts/src/leetcodes/src/graph/traversal/expression-evaluation.ts b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/expression-evaluation.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/expression-evaluation.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/expression-evaluation.ts diff --git a/node-concepts/src/leetcodes/src/graph/traversal/file-node-traversal.ts b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/file-node-traversal.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/file-node-traversal.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/file-node-traversal.ts diff --git a/node-concepts/src/leetcodes/src/graph/traversal/network-routing-traversal.ts b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/network-routing-traversal.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/network-routing-traversal.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/network-routing-traversal.ts diff --git a/node-concepts/src/leetcodes/src/graph/traversal/tree-traversal.ts b/node-concepts/src/leetcodes/src/data-structures/graph/traversal/tree-traversal.ts similarity index 100% rename from node-concepts/src/leetcodes/src/graph/traversal/tree-traversal.ts rename to node-concepts/src/leetcodes/src/data-structures/graph/traversal/tree-traversal.ts diff --git a/node-concepts/src/leetcodes/src/reverse-linked-list/index.ts b/node-concepts/src/leetcodes/src/reverse-linked-list/index.ts index 0347b4d..5b37385 100644 --- a/node-concepts/src/leetcodes/src/reverse-linked-list/index.ts +++ b/node-concepts/src/leetcodes/src/reverse-linked-list/index.ts @@ -1,4 +1,18 @@ +/** + * Singly Linked List + */ +class ListNode { + val: number; + next: ListNode | null; + + constructor(val?: number, next?: ListNode | null) { + this.val = val || 0; + this.next = next || null; + } +} + +/** Reverse Linked List */ export abstract class ReverseLinkedList { /** Reverse Linked List */ - public static solutionOne() {} + public static solutionOne(head: ListNode | null) {} }