perf fixes
This commit is contained in:
@@ -6,7 +6,7 @@ namespace TMI_practicum
|
||||
{
|
||||
public static IEnumerable<Intersection> Solve(IList<Circle> circles)
|
||||
{
|
||||
var intersections = new HashSet<Intersection>();
|
||||
var intersections = new Stack<Intersection>();
|
||||
|
||||
for (int i = 0; i < circles.Count - 1; i++)
|
||||
{
|
||||
@@ -18,7 +18,7 @@ namespace TMI_practicum
|
||||
if (intersects == null) continue;
|
||||
foreach (var intersect in intersects)
|
||||
{
|
||||
intersections.Add(intersect);
|
||||
intersections.Push(intersect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user