Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 14 additions & 31 deletions Algorithms.Tests/Algorithms.Tests.fsproj
Original file line number Diff line number Diff line change
@@ -1,46 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>

<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsPackable>false</IsPackable>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>

<ItemGroup>
<Compile Include="Math\FactorialTests.fs" />
<Compile Include="Math\PowerTests.fs" />
<Compile Include="Math\PerfectNumbersTests.fs" />
<Compile Include="Strings\ZFunctionTests.fs" />
<Compile Include="Strings\WordOccurrenceTests.fs" />
<Compile Include="Strings\UpperTests.fs" />
<Compile Include="Strings\SwapCaseTests.fs" />
<Compile Include="Strings\SplitTests.fs" />
<Compile Include="Strings\ReverseWordsTests.fs" />
<Compile Include="Strings\ReverseLettersTests.fs" />
<Compile Include="Strings\RemoveDuplicatesTests.fs" />
<Compile Include="Strings\RabinKarpTests.fs" />
<Compile Include="Strings\PrefixFunctionTests.fs" />
<Compile Include="Strings\NaiveStringSearchTests.fs" />
<Compile Include="Strings\ManacherTests.fs" />
<Compile Include="Strings\MinCostStringConversionTests.fs" />
<Compile Include="Strings\LowerTests.fs" />
<Compile Include="Strings\LevenshteinDistanceTests.fs" />
<Compile Include="Strings\KnuthMorrisPrattTests.fs" />
<Compile Include="Strings\JaroWinklerTests.fs" />
<Compile Include="Strings\IsPalindromeTests.fs" />
<Compile Include="Strings\CheckPangramTests.fs" />
<Compile Include="Strings\CheckAnagramsTests.fs" />
<Compile Include="Strings\CapitalizeTests.fs" />
<Compile Include="Math/*.fs" />
<Compile Include="Search/*.fs" />
<Compile Include="Sort/*.fs" />
<Compile Include="Strings/*.fs" />
<Compile Include="Program.fs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="coverlet.collector" Version="1.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
56 changes: 13 additions & 43 deletions Algorithms/Algorithms.fsproj
Original file line number Diff line number Diff line change
@@ -1,52 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>preview</LangVersion>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Include="Math/Abs.fs" />
<Compile Include="Math/AbsMax.fs" />
<Conpile Include="Math/AbsMin.fs" />
<Compile Include="Math/Factorial.fs" />
<Compile Include="Math/Fibonacci.fs" />
<Compile Include="Math/Perfect_Numbers.fs" />
<Compile Include="Math/Power.fs" />
<Compile Include="Sort/Bubble_Sort.fs" />
<Compile Include="Sort/Comb_Sort.fs" />
<Compile Include="Sort/Cycle_Sort.fs" />
<Compile Include="Sort/Gnome_Sort.fs" />
<Compile Include="Sort/Heap_Sort.fs" />
<Compile Include="Sort/Insertion_Sort.fs" />
<Compile Include="Sort/Merge_Sort.fs" />
<Compile Include="Sort/Pancake_Sort.fs" />
<Compile Include="Sort/Quick_Sort.fs" />
<Compile Include="Search/BinarySearch.fs" />
<Compile Include="Strings/Capitalize.fs" />
<Compile Include="Strings/CheckAnagrams.fs" />
<Compile Include="Strings/CheckPangram.fs" />
<Compile Include="Strings/IsPalindrome.fs" />
<Compile Include="Strings/JaroWinkler.fs" />
<Compile Include="Strings/KnuthMorrisPratt.fs" />
<Compile Include="Strings/LevenshteinDistance.fs" />
<Compile Include="Strings/Lower.fs" />
<Compile Include="Strings/Manacher.fs" />
<Compile Include="Strings/MinCostStringConversion.fs" />
<Compile Include="Strings/NaiveStringSearch.fs" />
<Compile Include="Strings/PrefixFunction.fs" />
<Compile Include="Strings/RabinKarp.fs" />
<Compile Include="Strings/RemoveDuplicates.fs" />
<Compile Include="Strings/ReverseLetters.fs" />
<Compile Include="Strings/ReverseWords.fs" />
<Compile Include="Strings/Split.fs" />
<Compile Include="Strings/SwapCase.fs" />
<Compile Include="Strings/Upper.fs" />
<Compile Include="Strings/WordOccurrence.fs" />
<Compile Include="Strings/ZFunction.fs" />
<Compile Include="Program.fs" />
<Compile Include="Math/*.fs" />
<Compile Include="Search/*.fs" />
<Compile Include="Sort/*.fs" />
<Compile Include="Strings/*.fs" />
</ItemGroup>
</Project>

</Project>
12 changes: 0 additions & 12 deletions Algorithms/Program.fs

This file was deleted.

4 changes: 3 additions & 1 deletion Algorithms/Strings/Manacher.fs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ module Manacher =

printfn "%A" newInputString
// Append last character
newInputString <- newInputString + (string) inputString.[^1]
newInputString <-
newInputString
+ string inputString.[inputString.Length - 1]

// We will store the starting and ending of previous furthest ending palindromic
// substring
Expand Down