E5F8 7种常用排序:排序、简单选择、直接插入、希尔、堆、归并、快速排序 · Micalson/Algorithms@07773c9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 07773c9

Browse files
committed
7种常用排序:排序、简单选择、直接插入、希尔、堆、归并、快速排序
1 parent 6ce570a commit 07773c9

File tree

4 files changed

+478
-2
lines changed

4 files changed

+478
-2
lines changed

CommonAlgorithms.xcodeproj/project.pbxproj

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
BF0BBB271F95FA5200E89F6C /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0BBB261F95FA3C00E89F6C /* main.cpp */; };
1212
BF0BBB331F9605BD00E89F6C /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF0BBB321F9605AE00E89F6C /* main.cpp */; };
1313
BF421FF21FBBE97D0048389F /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF421FE81FBBE95D0048389F /* main.cpp */; };
14+
BF421FFE1FBC221C0048389F /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF421FF41FBC21F40048389F /* main.cpp */; };
1415
BF44835B1FB2B6D300006975 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF4483511FB2B6AC00006975 /* main.cpp */; };
1516
BF7A4A111FB05DAB0066E5D2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BF7A4A071FB05D950066E5D2 /* main.cpp */; };
1617
BFA6B96E1FB9479700BB04F4 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BFA6B9641FB9477B00BB04F4 /* main.cpp */; };
@@ -54,6 +55,15 @@
5455
);
5556
runOnlyForDeploymentPostprocessing = 1;
5657
};
58+
BF421FF91FBC220E0048389F /* CopyFiles */ = {
59+
isa = PBXCopyFilesBuildPhase;
60+
buildActionMask = 2147483647;
61+
dstPath = /usr/share/man/man1/;
62+
dstSubfolderSpec = 0;
63+
files = (
64+
);
65+
runOnlyForDeploymentPostprocessing = 1;
66+
};
5767
BF4483561FB2B6BD00006975 /* CopyFiles */ = {
5868
isa = PBXCopyFilesBuildPhase;
5969
buildActionMask = 2147483647;
@@ -102,6 +112,8 @@
102112
BF0BBB321F9605AE00E89F6C /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
103113
BF421FE81FBBE95D0048389F /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
104114
BF421FF11FBBE96C0048389F /* Greedy */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Greedy; sourceTree = BUILT_PRODUCTS_DIR; };
115+
BF421FF41FBC21F40048389F /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
116+
BF421FFD1FBC220E0048389F /* Sort */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Sort; sourceTree = BUILT_PRODUCTS_DIR; };
105117
BF4483511FB2B6AC00006975 /* main.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
106118
BF44835A1FB2B6BD00006975 /* ShortPath */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ShortPath; sourceTree = BUILT_PRODUCTS_DIR; };
107119
BF44835C1FB2BFC000006975 /* preview.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = preview.png; sourceTree = "<group>"; };
@@ -144,6 +156,13 @@
144156
);
145157
runOnlyForDeploymentPostprocessing = 0;
146158
};
159+
BF421FF81FBC220E0048389F /* Frameworks */ = {
160+
isa = PBXFrameworksBuildPhase;
161+
buildActionMask = 2147483647;
162+
files = (
163+
);
164+
runOnlyForDeploymentPostprocessing = 0;
165+
};
147166
BF4483551FB2B6BD00006975 /* Frameworks */ = {
148167
isa = PBXFrameworksBuildPhase;
149168
buildActionMask = 2147483647;
@@ -203,6 +222,7 @@
203222
BFD3779F1FB4048F0058888B /* AVL */,
204223
BFA6B96D1FB9478400BB04F4 /* DP */,
205224
BF421FF11FBBE96C0048389F /* Greedy */,
225+
BF421FFD1FBC220E0048389F /* Sort */,
206226
);
207227
name = Products;
208228
sourceTree = "<group>";
@@ -218,6 +238,7 @@
218238
BFD377951FB404850058888B /* AVL */,
219239
BFA6B9631FB9477B00BB04F4 /* DP */,
220240
BF421FE71FBBE95D0048389F /* Greedy */,
241+
BF421FF31FBC21F40048389F /* Sort */,
221242
);
222243
path = CommonAlgorithms;
223244
sourceTree = "<group>";
@@ -248,6 +269,15 @@
248269
path = CommonAlgorithms/Greedy;
249270
sourceTree = SOURCE_ROOT;
250271
};
272+
BF421FF31FBC21F40048389F /* Sort */ = {
273+
isa = PBXGroup;
274+
children = (
275+
BF421FF41FBC21F40048389F /* main.cpp */,
276+
);
277+
name = Sort;
278+
path = CommonAlgorithms/Sort;
279+
sourceTree = SOURCE_ROOT;
280+
};
251281
BF4483501FB2B6AC00006975 /* ShortPath */ = {
252282
isa = PBXGroup;
253283
children = (
@@ -356,6 +386,23 @@
356386
productReference = BF421FF11FBBE96C0048389F /* Greedy */;
357387
productType = "com.apple.product-type.tool";
358388
};
389+
BF421FF51FBC220E0048389F /* Sort */ = {
390+
isa = PBXNativeTarget;
391+
buildConfigurationList = BF421FFA1FBC220E0048389F /* Build configuration list for PBXNativeTarget "Sort" */;
392+
buildPhases = (
393+
BF421FF61FBC220E0048389F /* Sources */,
394+
BF421FF81FBC220E0048389F /* Frameworks */,
395+
BF421FF91FBC220E0048389F /* CopyFiles */,
396+
);
397+
buildRules = (
398+
);
399+
dependencies = (
400+
);
401+
name = Sort;
402+
productName = CommonAlgorithms;
403+
productReference = BF421FFD1FBC220E0048389F /* Sort */;
404+
productType = "com.apple.product-type.tool";
405+
};
359406
BF4483521FB2B6BD00006975 /* ShortPath */ = {
360407
isa = PBXNativeTarget;
361408
buildConfigurationList = BF4483571FB2B6BD00006975 /* Build configuration list for PBXNativeTarget "ShortPath" */;
@@ -446,6 +493,9 @@
446493
BF421FE91FBBE96C0048389F = {
447494
ProvisioningStyle = Automatic;
448495
};
496+
BF421FF51FBC220E0048389F = {
497+
ProvisioningStyle = Automatic;
498+
};
449499
BF4483521FB2B6BD00006975 = {
450500
ProvisioningStyle = Automatic;
451501
};
@@ -480,6 +530,7 @@
480530
BFD377971FB4048F0058888B /* AVL */,
481531
BFA6B9651FB9478400BB04F4 /* DP */,
482532
BF421FE91FBBE96C0048389F /* Greedy */,
533+
BF421FF51FBC220E0048389F /* Sort */,
483534
);
484535
};
485536
/* End PBXProject section */
@@ -517,6 +568,14 @@
517568
);
518569
runOnlyForDeploymentPostprocessing = 0;
519570
};
571+
BF421FF61FBC220E0048389F /* Sources */ = {
572+
isa = PBXSourcesBuildPhase;
573+
buildActionMask = 2147483647;
574+
files = (
575+
BF421FFE1FBC221C0048389F /* main.cpp in Sources */,
576+
);
577+
runOnlyForDeploymentPostprocessing = 0;
578+
};
520579
BF4483531FB2B6BD00006975 /* Sources */ = {
521580
isa = PBXSourcesBuildPhase;
522581
buildActionMask = 2147483647;
@@ -727,6 +786,24 @@
727786
};
728787
name = Release;
729788
};
789+
BF421FFB1FBC220E0048389F /* Debug */ = {
790+
isa = XCBuildConfiguration;
791+
buildSettings = {
792+
CODE_SIGN_STYLE = Automatic;
793+
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/bin";
794+
PRODUCT_NAME = "$(TARGET_NAME)";
795+
};
796+
name = Debug;
797+
};
798+
BF421FFC1FBC220E0048389F /* Release */ = {
799+
isa = XCBuildConfiguration;
800+
buildSettings = {
801+
CODE_SIGN_STYLE = Automatic;
802+
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/bin";
803+
PRODUCT_NAME = "$(TARGET_NAME)";
804+
};
805+
name = Release;
806+
};
730807
BF4483581FB2B6BD00006975 /* Debug */ = {
731808
isa = XCBuildConfiguration;
732809
buildSettings = {
@@ -847,6 +924,15 @@
847924
defaultConfigurationIsVisible = 0;
848925
defaultConfigurationName = Release;
849926
};
927+
BF421FFA1FBC220E0048389F /* Build configuration list for PBXNativeTarget "Sort" */ = {
928+
isa = XCConfigurationList;
929+
buildConfigurations = (
930+
BF421FFB1FBC220E0048389F /* Debug */,
931+
BF421FFC1FBC220E0048389F /* Release */,
932+
);
933+
defaultConfigurationIsVisible = 0;
934+
defaultConfigurationName = Release;
935+
};
850936
BF4483571FB2B6BD00006975 /* Build configuration list for PBXNativeTarget "ShortPath" */ = {
851937
isa = XCConfigurationList;
852938
buildConfigurations = (
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0910"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "BF421FF51FBC220E0048389F"
18+
BuildableName = "Sort"
19+
BlueprintName = "Sort"
20+
ReferencedContainer = "container:CommonAlgorithms.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
language = ""
30+
shouldUseLaunchSchemeArgsEnv = "YES">
31+
<Testables>
32+
</Testables>
33+
<MacroExpansion>
34+
<BuildableReference
35+
BuildableIdentifier = "primary"
36+
BlueprintIdentifier = "BF421FF51FBC220E0048389F"
37+
BuildableName = "Sort"
38+
BlueprintName = "Sort"
39+
ReferencedContainer = "container:CommonAlgorithms.xcodeproj">
40+
</BuildableReference>
41+
</MacroExpansion>
42+
<AdditionalOptions>
43+
</AdditionalOptions>
44+
</TestAction>
45+
<LaunchAction
46+
buildConfiguration = "Debug"
47+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
48+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
49+
language = ""
50+
launchStyle = "0"
51+
useCustomWorkingDirectory = "NO"
52+
ignoresPersistentStateOnLaunch = "NO"
53+
debugDocumentVersioning = "YES"
54+
debugServiceExtension = "internal"
55+
allowLocationSimulation = "YES">
56+
<BuildableProductRunnable
57+
runnableDebuggingMode = "0">
58+
<BuildableReference
59+
BuildableIdentifier = "primary"
60+
BlueprintIdentifier = "BF421FF51FBC220E0048389F"
61+
BuildableName = "Sort"
62+
BlueprintName = "Sort"
63+
ReferencedContainer = "container:CommonAlgorithms.xcodeproj">
64+
</BuildableReference>
65+
</BuildableProductRunnable>
66+
<AdditionalOptions>
67+
</AdditionalOptions>
68+
</LaunchAction>
69+
<ProfileAction
70+
buildConfiguration = "Release"
71+
shouldUseLaunchSchemeArgsEnv = "YES"
72+
savedToolIdentifier = ""
73+
useCustomWorkingDirectory = "NO"
74+
debugDocumentVersioning = "YES">
75+
<BuildableProductRunnable
76+
runnableDebuggingMode = "0">
77+
<BuildableReference
78+
BuildableIdentifier = "primary"
79+
BlueprintIdentifier = "BF421FF51FBC220E0048389F"
80+
BuildableName = "Sort"
81+
BlueprintName = "Sort"
82+
ReferencedContainer = "container:CommonAlgorithms.xcodeproj">
83+
</BuildableReference>
84+
</BuildableProductRunnable>
85+
</ProfileAction>
86+
<AnalyzeAction
87+
buildConfiguration = "Debug">
88+
</AnalyzeAction>
89+
<ArchiveAction
90+
buildConfiguration = "Release"
91+
revealArchiveInOrganizer = "YES">
92+
</ArchiveAction>
93+
</Scheme>

CommonAlgorithms.xcodeproj/xcuserdata/vincent.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>AVL.xcscheme</key>
88
<dict>
99
<key>orderHint</key>
10-
<integer>6</integer>
10+
<integer>7</integer>
1111
</dict>
1212
<key>BinaryTree.xcscheme</key>
1313
<dict>
@@ -27,7 +27,7 @@
2727
<key>Greedy.xcscheme</key>
2828
<dict>
2929
<key>orderHint</key>
30-
<integer>7</integer>
30+
<integer>6</integer>
3131
</dict>
3232
<key>HuffmanTree.xcscheme</key>
3333
<dict>
@@ -44,6 +44,11 @@
4444
<key>orderHint</key>
4545
<integer>4</integer>
4646
</dict>
47+
<key>Sort.xcscheme</key>
48+
<dict>
49+
<key>orderHint</key>
50+
<integer>8</integer>
51+
</dict>
4752
</dict>
4853
</dict>
4954
</plist>

0 commit comments

Comments
 (0)
0