Skip to content

Commit

Permalink
Nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxrfv9090 committed Dec 2, 2023
1 parent 3331721 commit 7dc982c
Show file tree
Hide file tree
Showing 213 changed files with 288 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added 01/Problem No.2(1) (C)/.vs/Problem No.2/v17/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <time.h>
#include <stdio.h>


//generating random number
void generate_rand100(int arr[], int sz)
{
srand((unsigned int)time(NULL));
Expand All @@ -14,6 +14,7 @@ void generate_rand100(int arr[], int sz)
}
}

//swap two numbers
void swap(int* a, int* b)
{
*a ^= *b;
Expand All @@ -22,6 +23,10 @@ void swap(int* a, int* b)
}


//selection sort: select continuously and determine weather or the one of which two
//numbers are smaller.
//And put the smaller one in the front of the two numbers and do it for every other
//numbers from i = 0 to all the way to i = sz.
void selection_sort(int arr[], int sz)
{
if (arr == NULL || sz < 2)
Expand All @@ -35,6 +40,12 @@ void selection_sort(int arr[], int sz)
}
}

//The logics of this main function:
//Initiating the array
//Culculate the size of the array and store it as a variable
//Call the generating function to filled the mensioned array with random numbers
//Use selection sort to sort out the array
//At last use a for loop to print out all the numbers.
int main()
{
int arr[100] = { 0 };
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added Problem No.1 (C)/.vs/Problem No.1/v17/.suo
Binary file not shown.
Binary file not shown.
Binary file not shown.
31 changes: 31 additions & 0 deletions Problem No.1 (C)/Problem No.1.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33205.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Problem No.1", "Problem No.1\Problem No.1.vcxproj", "{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Debug|x64.ActiveCfg = Debug|x64
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Debug|x64.Build.0 = Debug|x64
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Debug|x86.ActiveCfg = Debug|Win32
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Debug|x86.Build.0 = Debug|Win32
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Release|x64.ActiveCfg = Release|x64
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Release|x64.Build.0 = Release|x64
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Release|x86.ActiveCfg = Release|Win32
{851B4F5A-DE5C-444C-8BC4-CCFC62A6F575}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {63E1B317-E509-4F65-8C7E-BC120F8F8C6D}
EndGlobalSection
EndGlobal
135 changes: 135 additions & 0 deletions Problem No.1 (C)/Problem No.1/Problem No.1.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{851b4f5a-de5c-444c-8bc4-ccfc62a6f575}</ProjectGuid>
<RootNamespace>ProblemNo1</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="main.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
22 changes: 22 additions & 0 deletions Problem No.1 (C)/Problem No.1/Problem No.1.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions Problem No.1 (C)/Problem No.1/Problem No.1.vcxproj.user
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
59 changes: 59 additions & 0 deletions Problem No.1 (C)/Problem No.1/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
//Merge Sort
#include <stdlib.h>
#include <time.h>
#include <stdio.h>

#define TEST_ARRAY_SIZE 10

void merge(int arr[], int L, int M, int R)
{
int space2[TEST_ARRAY_SIZE] = { 0 };
int i = 0;
int p1 = L;
int p2 = M + 1;
while (p1 <= M && p2 <= R)
space2[i++] = arr[p1] <= arr[p2] ? arr[p1++] : arr[p2++];
while (p1 <= M)
space2[i++] = arr[p1++];
while (p2 <= R)
space2[i++] = arr[p2++];
for (i = 0; i < TEST_ARRAY_SIZE; i++)
arr[L + i] = space2[i];
}

void generate_rand(int arr[], int sz)
{
srand((unsigned int)time(NULL));
for (int i = 0; i < sz; i++)
{
arr[i] = rand() % TEST_ARRAY_SIZE + 1;
}
}

void process(int arr[], int L, int R)
{
if (L == R)
return;
int mid = L + ((R - L) >> 1);
process(arr, L, mid);
process(arr, mid+1, R);
merge(arr, L, mid, R);
}

void merge_sort(int arr[], int sz)
{
if (arr == NULL || sz < 2)
return;
process(arr, 0, sz - 1);
}

int main()
{
int arr[TEST_ARRAY_SIZE] = { 0 };
int sz = TEST_ARRAY_SIZE;
generate_rand(arr, sz);
merge_sort(arr, sz);
for (int i = 0; i < TEST_ARRAY_SIZE; i++)
printf("%d\n", arr[i]);
return 0;
}
11 changes: 11 additions & 0 deletions Problem No.1 (C)/Problem No.1/x64/Debug/Problem No.1.exe.recipe
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\ImportanFiles\Coding Related\Repositories\LeetCode Quizes\Problem No.1\x64\Debug\Problem No.1.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>
Binary file not shown.
2 changes: 2 additions & 0 deletions Problem No.1 (C)/Problem No.1/x64/Debug/Problem No.1.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
 main.c
Problem No.1.vcxproj -> D:\ImportanFiles\Coding Related\Repositories\LeetCode Quizes\Problem No.1\x64\Debug\Problem No.1.exe
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.34.31933:TargetPlatformVersion=10.0.22000.0:
Debug|x64|D:\ImportanFiles\Coding Related\Repositories\LeetCode Quizes\Problem No.1\|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Problem No.1 (C)/Problem No.1/x64/Debug/main.obj
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Problem No.1 (C)/x64/Debug/Problem No.1.exe
Binary file not shown.
Binary file added Problem No.1 (C)/x64/Debug/Problem No.1.pdb
Binary file not shown.
10 changes: 10 additions & 0 deletions Problem No.1 (JS)/Problem No.1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';
const size = 10;

let array = [];
for (let i = 0; i++; i < size) {
array[i] = Math.random() * 20 + 1;
console.log(array[i]);
}

console.log(array);
Binary file not shown.
Binary file removed Problem No.2 (C)/.vs/Problem No.2/v17/.suo
Binary file not shown.
Binary file not shown.

0 comments on commit 7dc982c

Please sign in to comment.