Skip to content

Commit a92c14e

Browse files
committed
新增部分算法
1 parent 8be328f commit a92c14e

File tree

17 files changed

+1830
-18
lines changed

17 files changed

+1830
-18
lines changed

alg-cpp.xcodeproj/project.pbxproj

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
09A05C7B24BE09EF0010C78B /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09A05C7A24BE09EF0010C78B /* main.cpp */; };
1515
09ACF02E2316DB0B004A4A61 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09ACF02D2316DB0B004A4A61 /* main.cpp */; };
1616
09CE1EBD23269D4200001ECB /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 09CE1EBC23269D4200001ECB /* main.cpp */; };
17+
3A3E27E724EBC7B9005AF69A /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A3E27E624EBC7B9005AF69A /* main.c */; };
18+
3A3E27EE24EBC7F4005AF69A /* unionfind.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A3E27ED24EBC7F4005AF69A /* unionfind.c */; };
19+
3A3E27F224EBCD33005AF69A /* csapp.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A3E27F124EBCD33005AF69A /* csapp.c */; };
1720
3A5C8B8E22E0103B00354740 /* LRUV2.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5C8B8C22E0103B00354740 /* LRUV2.h */; };
1821
3A5C8B8F22E0103B00354740 /* LRUV1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5C8B8D22E0103B00354740 /* LRUV1.h */; };
1922
3A5C8B9722E0109200354740 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3A5C8B9622E0109200354740 /* main.cpp */; };
@@ -29,6 +32,9 @@
2932
3A717D9722DEBFB5002DA2C2 /* DSArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3A717D9522DEBFB5002DA2C2 /* DSArray.cpp */; };
3033
3A717D9F22DEC1A7002DA2C2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3A717D9E22DEC1A7002DA2C2 /* main.cpp */; };
3134
3A717DA522DEC1C1002DA2C2 /* singlyLinkedList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3A717DA422DEC1C1002DA2C2 /* singlyLinkedList.cpp */; };
35+
3A767EC524EBDCC9007AA738 /* quickfind.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A767EC424EBDCC9007AA738 /* quickfind.c */; };
36+
3A767EC724EBF5E1007AA738 /* quickuinon.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A767EC624EBF5E1007AA738 /* quickuinon.c */; };
37+
3A767ECA24ED430F007AA738 /* weightedQuickUnion.c in Sources */ = {isa = PBXBuildFile; fileRef = 3A767EC924ED430F007AA738 /* weightedQuickUnion.c */; };
3238
3AD40CCF22E9B4C7002D60A6 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AD40CCE22E9B4C7002D60A6 /* main.cpp */; };
3339
3AE1AFF522E2B9F400DF4545 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AE1AFF422E2B9F400DF4545 /* main.cpp */; };
3440
3AE1B00422E3174D00DF4545 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3AE1B00322E3174D00DF4545 /* main.cpp */; };
@@ -98,6 +104,15 @@
98104
);
99105
runOnlyForDeploymentPostprocessing = 1;
100106
};
107+
3A3E27E224EBC7B9005AF69A /* CopyFiles */ = {
108+
isa = PBXCopyFilesBuildPhase;
109+
buildActionMask = 2147483647;
110+
dstPath = /usr/share/man/man1/;
111+
dstSubfolderSpec = 0;
112+
files = (
113+
);
114+
runOnlyForDeploymentPostprocessing = 1;
115+
};
101116
3A5C8B9222E0109200354740 /* CopyFiles */ = {
102117
isa = PBXCopyFilesBuildPhase;
103118
buildActionMask = 2147483647;
@@ -346,6 +361,13 @@
346361
3A091A7422F41C4200EFA79C /* FindFirstCommonNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FindFirstCommonNode.h; sourceTree = "<group>"; };
347362
3A091A7722F4201800EFA79C /* deleteDuplication.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = deleteDuplication.h; sourceTree = "<group>"; };
348363
3A207EC1232A3133001FB923 /* Pattern.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Pattern.h; sourceTree = "<group>"; };
364+
3A3E27E424EBC7B9005AF69A /* alg4 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = alg4; sourceTree = BUILT_PRODUCTS_DIR; };
365+
3A3E27E624EBC7B9005AF69A /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
366+
3A3E27EC24EBC7F3005AF69A /* unionfind.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = unionfind.h; sourceTree = "<group>"; };
367+
3A3E27ED24EBC7F4005AF69A /* unionfind.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = unionfind.c; sourceTree = "<group>"; };
368+
3A3E27EF24EBCC65005AF69A /* tinyUF.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = tinyUF.txt; sourceTree = "<group>"; };
369+
3A3E27F024EBCD33005AF69A /* csapp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = csapp.h; sourceTree = "<group>"; };
370+
3A3E27F124EBCD33005AF69A /* csapp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = csapp.c; sourceTree = "<group>"; };
349371
3A5650752470248B002FBAED /* treeToDoublyList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = treeToDoublyList.h; sourceTree = "<group>"; };
350372
3A5650762472A5DE002FBAED /* removeRepeatChar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = removeRepeatChar.h; sourceTree = "<group>"; };
351373
3A5C8B8C22E0103B00354740 /* LRUV2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LRUV2.h; sourceTree = "<group>"; };
@@ -404,6 +426,10 @@
404426
3A717DAD22DF159B002DA2C2 /* hasCycle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = hasCycle.h; sourceTree = "<group>"; };
405427
3A717DB022DF213F002DA2C2 /* detectCycle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = detectCycle.h; sourceTree = "<group>"; };
406428
3A717DB322DF391C002DA2C2 /* reverseList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = reverseList.h; sourceTree = "<group>"; };
429+
3A767EC424EBDCC9007AA738 /* quickfind.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = quickfind.c; sourceTree = "<group>"; };
430+
3A767EC624EBF5E1007AA738 /* quickuinon.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = quickuinon.c; sourceTree = "<group>"; };
431+
3A767EC824ED430F007AA738 /* weightedQuickUnion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = weightedQuickUnion.h; sourceTree = "<group>"; };
432+
3A767EC924ED430F007AA738 /* weightedQuickUnion.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = weightedQuickUnion.c; sourceTree = "<group>"; };
407433
3AA8ED85241E717100179925 /* Expression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Expression.h; sourceTree = "<group>"; };
408434
3AAD2E6D22E00ADB006078A4 /* middleNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = middleNode.h; sourceTree = "<group>"; };
409435
3AAD2E6E22E00ADB006078A4 /* removeNthFromEnd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = removeNthFromEnd.h; sourceTree = "<group>"; };
@@ -477,6 +503,13 @@
477503
);
478504
runOnlyForDeploymentPostprocessing = 0;
479505
};
506+
3A3E27E124EBC7B9005AF69A /* Frameworks */ = {
507+
isa = PBXFrameworksBuildPhase;
508+
buildActionMask = 2147483647;
509+
files = (
510+
);
511+
runOnlyForDeploymentPostprocessing = 0;
512+
};
480513
3A5C8B9122E0109200354740 /* Frameworks */ = {
481514
isa = PBXFrameworksBuildPhase;
482515
buildActionMask = 2147483647;
@@ -988,6 +1021,31 @@
9881021
path = "coding-interviews";
9891022
sourceTree = "<group>";
9901023
};
1024+
3A3E27E524EBC7B9005AF69A /* alg4 */ = {
1025+
isa = PBXGroup;
1026+
children = (
1027+
3A3E27EB24EBC7E1005AF69A /* union-find */,
1028+
3A3E27E624EBC7B9005AF69A /* main.c */,
1029+
);
1030+
path = alg4;
1031+
sourceTree = "<group>";
1032+
};
1033+
3A3E27EB24EBC7E1005AF69A /* union-find */ = {
1034+
isa = PBXGroup;
1035+
children = (
1036+
3A3E27F124EBCD33005AF69A /* csapp.c */,
1037+
3A3E27F024EBCD33005AF69A /* csapp.h */,
1038+
3A3E27EC24EBC7F3005AF69A /* unionfind.h */,
1039+
3A3E27ED24EBC7F4005AF69A /* unionfind.c */,
1040+
3A767EC424EBDCC9007AA738 /* quickfind.c */,
1041+
3A767EC624EBF5E1007AA738 /* quickuinon.c */,
1042+
3A767EC824ED430F007AA738 /* weightedQuickUnion.h */,
1043+
3A767EC924ED430F007AA738 /* weightedQuickUnion.c */,
1044+
3A3E27EF24EBCC65005AF69A /* tinyUF.txt */,
1045+
);
1046+
path = "union-find";
1047+
sourceTree = "<group>";
1048+
};
9911049
3A5C8B9522E0109200354740 /* stack+queue */ = {
9921050
isa = PBXGroup;
9931051
children = (
@@ -1079,6 +1137,7 @@
10791137
09ACF02C2316DB0B004A4A61 /* divideandconquer */,
10801138
09CE1EBB23269D4200001ECB /* greed */,
10811139
09A05C7924BE09EF0010C78B /* ADT */,
1140+
3A3E27E524EBC7B9005AF69A /* alg4 */,
10821141
3A717D6922DEBC4E002DA2C2 /* Products */,
10831142
3A717D8F22DEBECF002DA2C2 /* Frameworks */,
10841143
);
@@ -1104,6 +1163,7 @@
11041163
09ACF02B2316DB0B004A4A61 /* divideandconquer */,
11051164
09CE1EBA23269D4200001ECB /* greed */,
11061165
09A05C7824BE09EF0010C78B /* ADT */,
1166+
3A3E27E424EBC7B9005AF69A /* alg4 */,
11071167
);
11081168
name = Products;
11091169
sourceTree = "<group>";
@@ -1383,6 +1443,23 @@
13831443
productReference = 09CE1EBA23269D4200001ECB /* greed */;
13841444
productType = "com.apple.product-type.tool";
13851445
};
1446+
3A3E27E324EBC7B9005AF69A /* alg4 */ = {
1447+
isa = PBXNativeTarget;
1448+
buildConfigurationList = 3A3E27E824EBC7B9005AF69A /* Build configuration list for PBXNativeTarget "alg4" */;
1449+
buildPhases = (
1450+
3A3E27E024EBC7B9005AF69A /* Sources */,
1451+
3A3E27E124EBC7B9005AF69A /* Frameworks */,
1452+
3A3E27E224EBC7B9005AF69A /* CopyFiles */,
1453+
);
1454+
buildRules = (
1455+
);
1456+
dependencies = (
1457+
);
1458+
name = alg4;
1459+
productName = alg4;
1460+
productReference = 3A3E27E424EBC7B9005AF69A /* alg4 */;
1461+
productType = "com.apple.product-type.tool";
1462+
};
13861463
3A5C8B9322E0109200354740 /* stack+queue */ = {
13871464
isa = PBXNativeTarget;
13881465
buildConfigurationList = 3A5C8B9822E0109200354740 /* Build configuration list for PBXNativeTarget "stack+queue" */;
@@ -1583,6 +1660,9 @@
15831660
09CE1EB923269D4200001ECB = {
15841661
CreatedOnToolsVersion = 10.3;
15851662
};
1663+
3A3E27E324EBC7B9005AF69A = {
1664+
CreatedOnToolsVersion = 11.1;
1665+
};
15861666
3A5C8B9322E0109200354740 = {
15871667
CreatedOnToolsVersion = 10.2.1;
15881668
};
@@ -1644,6 +1724,7 @@
16441724
09ACF02A2316DB0B004A4A61 /* divideandconquer */,
16451725
09CE1EB923269D4200001ECB /* greed */,
16461726
09A05C7724BE09EF0010C78B /* ADT */,
1727+
3A3E27E324EBC7B9005AF69A /* alg4 */,
16471728
);
16481729
};
16491730
/* End PBXProject section */
@@ -1705,6 +1786,19 @@
17051786
);
17061787
runOnlyForDeploymentPostprocessing = 0;
17071788
};
1789+
3A3E27E024EBC7B9005AF69A /* Sources */ = {
1790+
isa = PBXSourcesBuildPhase;
1791+
buildActionMask = 2147483647;
1792+
files = (
1793+
3A3E27F224EBCD33005AF69A /* csapp.c in Sources */,
1794+
3A3E27EE24EBC7F4005AF69A /* unionfind.c in Sources */,
1795+
3A767ECA24ED430F007AA738 /* weightedQuickUnion.c in Sources */,
1796+
3A767EC524EBDCC9007AA738 /* quickfind.c in Sources */,
1797+
3A767EC724EBF5E1007AA738 /* quickuinon.c in Sources */,
1798+
3A3E27E724EBC7B9005AF69A /* main.c in Sources */,
1799+
);
1800+
runOnlyForDeploymentPostprocessing = 0;
1801+
};
17081802
3A5C8B9022E0109200354740 /* Sources */ = {
17091803
isa = PBXSourcesBuildPhase;
17101804
buildActionMask = 2147483647;
@@ -1875,6 +1969,7 @@
18751969
09A05C7C24BE09EF0010C78B /* Debug */ = {
18761970
isa = XCBuildConfiguration;
18771971
buildSettings = {
1972+
CODE_SIGN_IDENTITY = "-";
18781973
CODE_SIGN_STYLE = Automatic;
18791974
DEVELOPMENT_TEAM = K78T9LD5UA;
18801975
MACOSX_DEPLOYMENT_TARGET = 10.14;
@@ -1885,6 +1980,7 @@
18851980
09A05C7D24BE09EF0010C78B /* Release */ = {
18861981
isa = XCBuildConfiguration;
18871982
buildSettings = {
1983+
CODE_SIGN_IDENTITY = "-";
18881984
CODE_SIGN_STYLE = Automatic;
18891985
DEVELOPMENT_TEAM = K78T9LD5UA;
18901986
MACOSX_DEPLOYMENT_TARGET = 10.14;
@@ -1915,6 +2011,7 @@
19152011
09CE1EBE23269D4200001ECB /* Debug */ = {
19162012
isa = XCBuildConfiguration;
19172013
buildSettings = {
2014+
CODE_SIGN_IDENTITY = "-";
19182015
CODE_SIGN_STYLE = Automatic;
19192016
DEVELOPMENT_TEAM = K78T9LD5UA;
19202017
MACOSX_DEPLOYMENT_TARGET = 10.14;
@@ -1932,6 +2029,28 @@
19322029
};
19332030
name = Release;
19342031
};
2032+
3A3E27E924EBC7B9005AF69A /* Debug */ = {
2033+
isa = XCBuildConfiguration;
2034+
buildSettings = {
2035+
CODE_SIGN_IDENTITY = "-";
2036+
CODE_SIGN_STYLE = Automatic;
2037+
DEVELOPMENT_TEAM = K78T9LD5UA;
2038+
ENABLE_HARDENED_RUNTIME = YES;
2039+
PRODUCT_NAME = "$(TARGET_NAME)";
2040+
};
2041+
name = Debug;
2042+
};
2043+
3A3E27EA24EBC7B9005AF69A /* Release */ = {
2044+
isa = XCBuildConfiguration;
2045+
buildSettings = {
2046+
CODE_SIGN_IDENTITY = "-";
2047+
CODE_SIGN_STYLE = Automatic;
2048+
DEVELOPMENT_TEAM = K78T9LD5UA;
2049+
ENABLE_HARDENED_RUNTIME = YES;
2050+
PRODUCT_NAME = "$(TARGET_NAME)";
2051+
};
2052+
name = Release;
2053+
};
19352054
3A5C8B9922E0109200354740 /* Debug */ = {
19362055
isa = XCBuildConfiguration;
19372056
buildSettings = {
@@ -2168,18 +2287,22 @@
21682287
3A717DA122DEC1A7002DA2C2 /* Debug */ = {
21692288
isa = XCBuildConfiguration;
21702289
buildSettings = {
2290+
CODE_SIGN_IDENTITY = "Mac Developer";
21712291
CODE_SIGN_STYLE = Automatic;
21722292
DEVELOPMENT_TEAM = K78T9LD5UA;
21732293
PRODUCT_NAME = "$(TARGET_NAME)";
2294+
PROVISIONING_PROFILE_SPECIFIER = "";
21742295
};
21752296
name = Debug;
21762297
};
21772298
3A717DA222DEC1A7002DA2C2 /* Release */ = {
21782299
isa = XCBuildConfiguration;
21792300
buildSettings = {
2301+
CODE_SIGN_IDENTITY = "Mac Developer";
21802302
CODE_SIGN_STYLE = Automatic;
21812303
DEVELOPMENT_TEAM = K78T9LD5UA;
21822304
PRODUCT_NAME = "$(TARGET_NAME)";
2305+
PROVISIONING_PROFILE_SPECIFIER = "";
21832306
};
21842307
name = Release;
21852308
};
@@ -2303,6 +2426,15 @@
23032426
defaultConfigurationIsVisible = 0;
23042427
defaultConfigurationName = Release;
23052428
};
2429+
3A3E27E824EBC7B9005AF69A /* Build configuration list for PBXNativeTarget "alg4" */ = {
2430+
isa = XCConfigurationList;
2431+
buildConfigurations = (
2432+
3A3E27E924EBC7B9005AF69A /* Debug */,
2433+
3A3E27EA24EBC7B9005AF69A /* Release */,
2434+
);
2435+
defaultConfigurationIsVisible = 0;
2436+
defaultConfigurationName = Release;
2437+
};
23062438
3A5C8B9822E0109200354740 /* Build configuration list for PBXNativeTarget "stack+queue" */ = {
23072439
isa = XCConfigurationList;
23082440
buildConfigurations = (
17.3 KB
Binary file not shown.
3.26 KB
Binary file not shown.

alg-cpp.xcodeproj/xcuserdata/junl.xcuserdatad/xcschemes/xcschememanagement.plist

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
<key>ADT.xcscheme_^#shared#^_</key>
88
<dict>
99
<key>orderHint</key>
10-
<integer>16</integer>
10+
<integer>15</integer>
1111
</dict>
1212
<key>alg-cpp.xcscheme_^#shared#^_</key>
1313
<dict>
1414
<key>orderHint</key>
1515
<integer>0</integer>
1616
</dict>
17+
<key>alg4.xcscheme_^#shared#^_</key>
18+
<dict>
19+
<key>orderHint</key>
20+
<integer>17</integer>
21+
</dict>
1722
<key>array.xcscheme_^#shared#^_</key>
1823
<dict>
1924
<key>orderHint</key>
@@ -47,7 +52,7 @@
4752
<key>greed.xcscheme_^#shared#^_</key>
4853
<dict>
4954
<key>orderHint</key>
50-
<integer>15</integer>
55+
<integer>16</integer>
5156
</dict>
5257
<key>hasTable.xcscheme_^#shared#^_</key>
5358
<dict>

0 commit comments

Comments
 (0)