1
0

perf fixes

This commit is contained in:
2019-05-15 16:58:33 +02:00
parent de4d08b938
commit 311da13574
3 changed files with 8 additions and 7 deletions

View File

@@ -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);
}
}
}