Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
76ec4e6
Add C# branch
Fuflick Feb 27, 2023
daaa2ee
fix some troubles
Fuflick Feb 27, 2023
2cf05e5
Tests for first task from Yandex Contest
Fuflick Mar 1, 2023
aaba1e3
Add QuickSort method
Fuflick Mar 7, 2023
8a7d85f
Fix some troubles
Fuflick Mar 7, 2023
0b83744
Fix some troubles and check QuickSort.Sort method
Fuflick Mar 7, 2023
b53de3b
Test of my MergeSort alg
Fuflick Mar 9, 2023
aac17a0
Add Sort process task and Pair sort (1 and 2 tasks from Module 2 Yand…
Fuflick Mar 14, 2023
3d2f234
Fix quickSort metfod formating and boke some another methods, I'l rep…
Fuflick Mar 16, 2023
dfb00d6
Fix MergeSort and some inversion
Fuflick Mar 22, 2023
5727fde
Add 5 task from contest (Number of different integers)
Fuflick Mar 23, 2023
55a0afb
Add Radix Sort method
Fuflick Mar 25, 2023
3d9cc34
Add Module3 directive to CourceApp and CourceAppTest, have started to…
Fuflick Mar 27, 2023
701a91e
result became a List<string> from string
Fuflick Mar 27, 2023
cae052c
Tests is working now, but I've got some problem with exceptions
Fuflick Mar 28, 2023
08608bc
Add find Substring method by Rabin-Karp
Fuflick Mar 29, 2023
41f5fc2
Add Kmp method, but it is not working right
Fuflick Apr 9, 2023
2265e6e
GPT genered code for Kmp
Fuflick Apr 9, 2023
69968a2
Shiftstring by Rabin-Karp metgod is working right now
Fuflick Apr 21, 2023
81a6542
CircleString Method by prefix funhion of string
Fuflick Apr 21, 2023
eb7eaff
Add Prefix function by JsConst
Fuflick Apr 25, 2023
6f88cd5
Add 4th task of 3rd module (Z-functoin of str, named CyclingString). …
Fuflick May 2, 2023
5e381f7
Add tests for ZFunc finder(do not working now)
Fuflick May 2, 2023
4d4d096
Fix code, now tests are working
Fuflick May 3, 2023
1e9956c
Start to write BalsCount method. (4 module 1 task) why stach is empty…
Fuflick May 3, 2023
e9e8de0
Add 1 Task of 4 Module and Tests for it
Fuflick May 5, 2023
1f6e4a8
fix naming in PSP class and rewrite it for understand more
Fuflick May 5, 2023
151f3d6
Task 2 From 4 module (Sort) and tests
Fuflick May 14, 2023
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
206 changes: 206 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
build/
[Bb]in/
[Oo]bj/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc

# OS generated files #
.DS_Store*
Icon?

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.Publish.xml

# Windows Azure Build Output
csx
*.build.csdef

# Windows Store app package directory
AppPackages/

# Others
*.Cache
ClientBin/
# [Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.[Pp]ublish.xml
*.pfx
*.publishsettings
modulesbin/
tempbin/

# EPiServer Site file (VPP)
AppData/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# vim
*.txt~
*.swp
*.swo

# svn
.svn

# Remainings from resolvings conflicts in Source Control
*.orig

# SQL Server files
**/App_Data/*.mdf
**/App_Data/*.ldf
**/App_Data/*.sdf


#LightSwitch generated files
GeneratedArtifacts/
_Pvt_Extensions/
ModelManifest.xml

# =========================
# Windows detritus
# =========================

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Mac desktop service store files
.DS_Store

# SASS Compiler cache
.sass-cache

# Visual Studio 2014 CTP
**/*.sln.ide

# Visual Studio temp something
.vs/

# VS 2015+
*.vc.vc.opendb
*.vc.db

# Rider
.idea/

**/node_modules/*

# Added by Jskonst
# .vscode/
Properties/

#####
# End of core ignore list, below put you custom 'per project' settings (patterns or path)
#####
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/CVS": true,
"**/.DS_Store": true,
"CourseApp": true,
"CourseApp.test":true,
}
}
30 changes: 30 additions & 0 deletions CourseApp.Tests/CourseApp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<NoWarn>1573,1591,1701;1702;1705</NoWarn>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CourseApp\CourseApp.csproj" />
</ItemGroup>

<PropertyGroup>
<CodeAnalysisRuleSet>../_stylecop/stylecop.ruleset</CodeAnalysisRuleSet>
<GenerateFullPaths>true</GenerateFullPaths>
</PropertyGroup>

<ItemGroup>
<AdditionalFiles Include="../_stylecop/stylecop.json" />
</ItemGroup>

</Project>
14 changes: 14 additions & 0 deletions CourseApp.Tests/DemoTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Xunit;
using CourseApp;

namespace CourseApp.Tests
{
public class DemoTest
{
[Fact]
public void Test1()
{
}
}
}
41 changes: 41 additions & 0 deletions CourseApp.Tests/Module1/AplusBTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.IO;
using Xunit;
using CourseApp.Module1;

namespace CourseApp.Tests.Module1
{
[Collection("Sequential")]
public class AplusBTest : IDisposable
{
public void Dispose()
{
var standardOut = new StreamWriter(Console.OpenStandardOutput());
standardOut.AutoFlush = true;
var standardIn = new StreamReader(Console.OpenStandardInput());
Console.SetOut(standardOut);
Console.SetIn(standardIn);
}

[Theory]
[InlineData("10 12", "22")]
[InlineData("1 1", "2")]
[InlineData("10000 10000", "20000")]
public void Test1(string input, string expected)
{
var stringWriter = new StringWriter();
Console.SetOut(stringWriter);

var stringReader = new StringReader(input);
Console.SetIn(stringReader);

// act
AplusB.Calculate();

// assert
var output = stringWriter.ToString().Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
Assert.Equal($"{expected}", output[0]);
var standardOutput = new StreamWriter(Console.OpenStandardOutput());
}
}
}
51 changes: 51 additions & 0 deletions CourseApp.Tests/Module2/BubbleSortTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
namespace CourseApp.Tests.Module2
{
using System;
using System.Collections.Generic;
using System.IO;
using CourseApp.Module2;
using Xunit;

[Collection("Sequential")]
public class BubbleSortTest : IDisposable
{
private const string Inp1 = @"4
4 3 2 1";

private const string Out1 = @"3 4 2 1
3 2 4 1
3 2 1 4
2 3 1 4
2 1 3 4
1 2 3 4";

public void Dispose()
{
var standardOut = new StreamWriter(Console.OpenStandardOutput());
standardOut.AutoFlush = true;
var standardIn = new StreamReader(Console.OpenStandardInput());
Console.SetOut(standardOut);
Console.SetIn(standardIn);
}

[Theory]
[InlineData(Inp1, Out1)]
public void Test1(string input, string expected)
{
var stringWriter = new StringWriter();
Console.SetOut(stringWriter);

var stringReader = new StringReader(input);
Console.SetIn(stringReader);

// act
BubleSort.Sort();

// assert
var output = stringWriter.ToString().Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
var result = string.Join(Environment.NewLine, output);

Assert.Equal($"{expected}", result);
}
}
}
41 changes: 41 additions & 0 deletions CourseApp.Tests/Module3/FindStringTest.cs

Large diffs are not rendered by default.

Loading