Skip to content

Commit

Permalink
Added golf run shell to the two-sum problem test suite.
Browse files Browse the repository at this point in the history
  • Loading branch information
tacosontitan committed Apr 9, 2024
1 parent 9dc6728 commit 705e0be
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions samples/Hussy.Net.Playground/Leetcode/Easy/TwoSum/GolfRun.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace Hussy.Net.Playground.Leetcode.Easy;

/// <summary>
/// Represents a solution and its tests for the leetcode two-sum problem.
/// </summary>
/// <see href="https://leetcode.com/problems/two-sum/description/"/>
public sealed partial class TwoSum
{
/// <summary>
/// A simple golf run to prepare for the Hussy run.
/// </summary>
/// <param name="numbers">The array of numbers to look through.</param>
/// <param name="target">
/// The target number which the two numbers in <paramref name="numbers"/> must add up to.
/// </param>
/// <returns>
/// The two indices of the numbers which add up to the <paramref name="target"/>.
/// </returns>
private static IEnumerable<int> GolfRun(
int[] numbers,
int target)
{
return Enumerable.Empty<int>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public sealed partial class TwoSum
private static TestFunction[] TestFunctions =>
[
DryRun,
ComplexityRun
ComplexityRun,
GolfRun
];

/// <summary>
Expand Down

0 comments on commit 705e0be

Please sign in to comment.