Skip to content

Commit 282fb7a

Browse files
committed
chore: add GlobalUsings.cs with project-wide using directives in data structures
1 parent 767c45a commit 282fb7a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+26
-127
lines changed

DataStructures/AATree/AATree.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace DataStructures.AATree;
52

63
/// <summary>

DataStructures/AVLTree/AVLTree.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace DataStructures.AVLTree;
52

63
/// <summary>

DataStructures/AVLTree/AVLTreeNode.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
31
namespace DataStructures.AVLTree;
42

53
/// <summary>

DataStructures/BinarySearchTree/BinarySearchTree.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace DataStructures.BinarySearchTree;
52

63
/// <summary>

DataStructures/BitArray.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,7 @@
114114
// returns true if there inputs aren't equal otherwise false.
115115
// assumes: the input bit-arrays must have same length.
116116

117-
using System;
118117
using System.Collections;
119-
using System.Collections.Generic;
120-
using System.Linq;
121-
using System.Text;
122118

123119
namespace DataStructures;
124120

DataStructures/Cache/LfuCache.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Generic;
2-
31
namespace DataStructures.Cache;
42

53
/// <summary>

DataStructures/Cache/LruCache.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Generic;
2-
31
namespace DataStructures.Cache;
42

53
/// <summary>

DataStructures/GlobalUsings.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// -----------------------------------------------------------------------------
2+
// Global using directives for the C-Sharp solution.
3+
// These namespaces are imported globally so they don’t need to be repeatedly declared
4+
// in individual files, improving readability and reducing boilerplate.
5+
//
6+
// Guidelines:
7+
// - Keep only the most commonly used namespaces here.
8+
// - Add project-specific namespaces (e.g., Utilities.Extensions) only if they are
9+
// required across the majority of files in the project.
10+
// - Avoid placing rarely used namespaces here to maintain clarity.
11+
// -----------------------------------------------------------------------------
12+
13+
global using System; // Core base classes and fundamental types
14+
global using System.Collections.Generic; // Generic collection types (List, Dictionary, etc.)
15+
global using System.Linq; // LINQ query operators for collections
16+
global using System.Text; // Text encoding, StringBuilder, etc.

DataStructures/Graph/DirectedWeightedGraph.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
3-
41
namespace DataStructures.Graph;
52

63
/// <summary>

DataStructures/Graph/IDirectedWeightedGraph.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System.Collections.Generic;
2-
31
namespace DataStructures.Graph;
42

53
public interface IDirectedWeightedGraph<T>

0 commit comments

Comments
 (0)