Skip to content

Commit 7b75f12

Browse files
authored
Merge branch 'doocs:main' into gh-pages
2 parents 5c37cdf + 80d9354 commit 7b75f12

File tree

32,492 files changed

+2562241
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

32,492 files changed

+2562241
-0
lines changed

.clang-format

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
Language: Java
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: DontAlign
5+
AlignConsecutiveMacros: false
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignEscapedNewlines: Right
9+
AlignOperands: false
10+
AlignTrailingComments: false
11+
AllowAllArgumentsOnNextLine: true
12+
AllowAllConstructorInitializersOnNextLine: true
13+
AllowAllParametersOfDeclarationOnNextLine: true
14+
AllowShortBlocksOnASingleLine: Never
15+
AllowShortCaseLabelsOnASingleLine: false
16+
AllowShortFunctionsOnASingleLine: false
17+
AllowShortLambdasOnASingleLine: All
18+
AllowShortIfStatementsOnASingleLine: true
19+
AllowShortLoopsOnASingleLine: true
20+
AlwaysBreakAfterDefinitionReturnType: None
21+
AlwaysBreakAfterReturnType: None
22+
AlwaysBreakBeforeMultilineStrings: false
23+
AlwaysBreakTemplateDeclarations: MultiLine
24+
BinPackArguments: true
25+
BinPackParameters: true
26+
BraceWrapping:
27+
AfterCaseLabel: false
28+
AfterClass: false
29+
AfterControlStatement: false
30+
AfterEnum: false
31+
AfterFunction: false
32+
AfterNamespace: false
33+
AfterObjCDeclaration: false
34+
AfterStruct: false
35+
AfterUnion: false
36+
AfterExternBlock: false
37+
BeforeCatch: false
38+
BeforeElse: false
39+
IndentBraces: false
40+
SplitEmptyFunction: true
41+
SplitEmptyRecord: true
42+
SplitEmptyNamespace: true
43+
BreakBeforeBinaryOperators: All
44+
BreakBeforeBraces: Custom
45+
BreakBeforeInheritanceComma: false
46+
BreakInheritanceList: BeforeColon
47+
BreakBeforeTernaryOperators: true
48+
BreakConstructorInitializersBeforeComma: false
49+
BreakConstructorInitializers: BeforeComma
50+
BreakAfterJavaFieldAnnotations: false
51+
BreakStringLiterals: true
52+
ColumnLimit: 100
53+
CommentPragmas: '^ IWYU pragma:'
54+
CompactNamespaces: false
55+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
56+
ConstructorInitializerIndentWidth: 4
57+
ContinuationIndentWidth: 4
58+
Cpp11BracedListStyle: true
59+
DeriveLineEnding: true
60+
DerivePointerAlignment: false
61+
DisableFormat: false
62+
ExperimentalAutoDetectBinPacking: false
63+
FixNamespaceComments: false
64+
ForEachMacros:
65+
- foreach
66+
- Q_FOREACH
67+
- BOOST_FOREACH
68+
IncludeBlocks: Preserve
69+
IncludeCategories:
70+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
71+
Priority: 2
72+
SortPriority: 0
73+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
74+
Priority: 3
75+
SortPriority: 0
76+
- Regex: '.*'
77+
Priority: 1
78+
SortPriority: 0
79+
IncludeIsMainRegex: '(Test)?$'
80+
IncludeIsMainSourceRegex: ''
81+
IndentCaseLabels: false
82+
IndentGotoLabels: true
83+
IndentPPDirectives: None
84+
IndentWidth: 4
85+
IndentWrappedFunctionNames: false
86+
JavaScriptQuotes: Leave
87+
JavaScriptWrapImports: true
88+
KeepEmptyLinesAtTheStartOfBlocks: true
89+
MacroBlockBegin: ''
90+
MacroBlockEnd: ''
91+
MaxEmptyLinesToKeep: 1
92+
NamespaceIndentation: Inner
93+
ObjCBinPackProtocolList: Auto
94+
ObjCBlockIndentWidth: 4
95+
ObjCSpaceAfterProperty: true
96+
ObjCSpaceBeforeProtocolList: true
97+
PenaltyBreakAssignment: 2
98+
PenaltyBreakBeforeFirstCallParameter: 19
99+
PenaltyBreakComment: 300
100+
PenaltyBreakFirstLessLess: 120
101+
PenaltyBreakString: 1000
102+
PenaltyBreakTemplateDeclaration: 10
103+
PenaltyExcessCharacter: 1000000
104+
PenaltyReturnTypeOnItsOwnLine: 60
105+
PointerAlignment: Left
106+
ReflowComments: true
107+
SortIncludes: true
108+
SortUsingDeclarations: true
109+
SpaceAfterCStyleCast: true
110+
SpaceAfterLogicalNot: false
111+
SpaceAfterTemplateKeyword: true
112+
SpaceBeforeAssignmentOperators: true
113+
SpaceBeforeCpp11BracedList: false
114+
SpaceBeforeCtorInitializerColon: true
115+
SpaceBeforeInheritanceColon: true
116+
SpaceBeforeParens: ControlStatements
117+
SpaceBeforeRangeBasedForLoopColon: true
118+
SpaceInEmptyBlock: false
119+
SpaceInEmptyParentheses: false
120+
SpacesBeforeTrailingComments: 1
121+
SpacesInAngles: false
122+
SpacesInConditionalStatement: false
123+
SpacesInContainerLiterals: false
124+
SpacesInCStyleCastParentheses: false
125+
SpacesInParentheses: false
126+
SpacesInSquareBrackets: false
127+
SpaceBeforeSquareBrackets: false
128+
Standard: Latest
129+
StatementMacros:
130+
- Q_UNUSED
131+
- QT_REQUIRE_VERSION
132+
TabWidth: 8
133+
UseCRLF: false
134+
UseTab: Never
135+
...
136+
137+
138+
139+
140+
---
141+
Language: Cpp
142+
# BasedOnStyle: WebKit
143+
AccessModifierOffset: -4
144+
AlignAfterOpenBracket: DontAlign
145+
AlignConsecutiveMacros: false
146+
AlignConsecutiveAssignments: false
147+
AlignConsecutiveDeclarations: false
148+
AlignEscapedNewlines: Right
149+
AlignOperands: false
150+
AlignTrailingComments: false
151+
AllowAllArgumentsOnNextLine: true
152+
AllowAllConstructorInitializersOnNextLine: true
153+
AllowAllParametersOfDeclarationOnNextLine: true
154+
AllowShortBlocksOnASingleLine: Always
155+
AllowShortCaseLabelsOnASingleLine: true
156+
AllowShortFunctionsOnASingleLine: All
157+
AllowShortLambdasOnASingleLine: All
158+
AllowShortIfStatementsOnASingleLine: true
159+
AllowShortLoopsOnASingleLine: true
160+
AlwaysBreakAfterDefinitionReturnType: None
161+
AlwaysBreakAfterReturnType: None
162+
AlwaysBreakBeforeMultilineStrings: false
163+
AlwaysBreakTemplateDeclarations: MultiLine
164+
BinPackArguments: true
165+
BinPackParameters: true
166+
BraceWrapping:
167+
AfterCaseLabel: false
168+
AfterClass: false
169+
AfterControlStatement: false
170+
AfterEnum: false
171+
AfterFunction: false
172+
AfterNamespace: false
173+
AfterObjCDeclaration: false
174+
AfterStruct: false
175+
AfterUnion: false
176+
AfterExternBlock: false
177+
BeforeCatch: false
178+
BeforeElse: false
179+
IndentBraces: false
180+
SplitEmptyFunction: true
181+
SplitEmptyRecord: true
182+
SplitEmptyNamespace: true
183+
BreakBeforeBinaryOperators: All
184+
BreakBeforeBraces: Custom
185+
BreakBeforeInheritanceComma: false
186+
BreakInheritanceList: BeforeColon
187+
BreakBeforeTernaryOperators: true
188+
BreakConstructorInitializersBeforeComma: false
189+
BreakConstructorInitializers: BeforeComma
190+
BreakAfterJavaFieldAnnotations: false
191+
BreakStringLiterals: true
192+
ColumnLimit: 0
193+
CommentPragmas: '^ IWYU pragma:'
194+
CompactNamespaces: false
195+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
196+
ConstructorInitializerIndentWidth: 4
197+
ContinuationIndentWidth: 4
198+
Cpp11BracedListStyle: true
199+
DeriveLineEnding: true
200+
DerivePointerAlignment: false
201+
DisableFormat: false
202+
ExperimentalAutoDetectBinPacking: false
203+
FixNamespaceComments: false
204+
ForEachMacros:
205+
- foreach
206+
- Q_FOREACH
207+
- BOOST_FOREACH
208+
IncludeBlocks: Preserve
209+
IncludeCategories:
210+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
211+
Priority: 2
212+
SortPriority: 0
213+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
214+
Priority: 3
215+
SortPriority: 0
216+
- Regex: '.*'
217+
Priority: 1
218+
SortPriority: 0
219+
IncludeIsMainRegex: '(Test)?$'
220+
IncludeIsMainSourceRegex: ''
221+
IndentCaseLabels: false
222+
IndentGotoLabels: true
223+
IndentPPDirectives: None
224+
IndentWidth: 4
225+
IndentWrappedFunctionNames: false
226+
JavaScriptQuotes: Leave
227+
JavaScriptWrapImports: true
228+
KeepEmptyLinesAtTheStartOfBlocks: true
229+
MacroBlockBegin: ''
230+
MacroBlockEnd: ''
231+
MaxEmptyLinesToKeep: 1
232+
NamespaceIndentation: Inner
233+
ObjCBinPackProtocolList: Auto
234+
ObjCBlockIndentWidth: 4
235+
ObjCSpaceAfterProperty: true
236+
ObjCSpaceBeforeProtocolList: true
237+
PenaltyBreakAssignment: 2
238+
PenaltyBreakBeforeFirstCallParameter: 19
239+
PenaltyBreakComment: 300
240+
PenaltyBreakFirstLessLess: 120
241+
PenaltyBreakString: 1000
242+
PenaltyBreakTemplateDeclaration: 10
243+
PenaltyExcessCharacter: 1000000
244+
PenaltyReturnTypeOnItsOwnLine: 60
245+
PointerAlignment: Left
246+
ReflowComments: true
247+
SortIncludes: true
248+
SortUsingDeclarations: true
249+
SpaceAfterCStyleCast: true
250+
SpaceAfterLogicalNot: false
251+
SpaceAfterTemplateKeyword: true
252+
SpaceBeforeAssignmentOperators: true
253+
SpaceBeforeCpp11BracedList: false
254+
SpaceBeforeCtorInitializerColon: true
255+
SpaceBeforeInheritanceColon: true
256+
SpaceBeforeParens: ControlStatements
257+
SpaceBeforeRangeBasedForLoopColon: true
258+
SpaceInEmptyBlock: false
259+
SpaceInEmptyParentheses: false
260+
SpacesBeforeTrailingComments: 1
261+
SpacesInAngles: false
262+
SpacesInConditionalStatement: false
263+
SpacesInContainerLiterals: false
264+
SpacesInCStyleCastParentheses: false
265+
SpacesInParentheses: false
266+
SpacesInSquareBrackets: false
267+
SpaceBeforeSquareBrackets: false
268+
Standard: Latest
269+
StatementMacros:
270+
- Q_UNUSED
271+
- QT_REQUIRE_VERSION
272+
TabWidth: 8
273+
UseCRLF: false
274+
UseTab: Never
275+
...
276+

.editorconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# REF: https://spec.editorconfig.org/#supported-pairs
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
# tab_width = 4
9+
# end_of_line = lf
10+
charset = utf-8
11+
# spelling_language = en-US
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
15+
[*.{md}]
16+
trim_trailing_whitespace = false
17+
18+
[*.{go}]
19+
indent_style = tab
20+
21+
[*.{yml,yaml}]
22+
indent_size = 2

.github/FUNDING.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
2+
patreon: # Replace with a single Patreon username
3+
open_collective: doocs-leetcode
4+
ko_fi: # Replace with a single Ko-fi username
5+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
6+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
7+
liberapay: # Replace with a single Liberapay username
8+
issuehunt: # Replace with a single IssueHunt username
9+
otechie: # Replace with a single Otechie username
10+
custom: # Replace with a single custom sponsorship URL

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

.github/workflows/black-lint.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: black-linter
2+
3+
on:
4+
push:
5+
paths:
6+
- solution/**
7+
- lcs/**
8+
- lcp/**
9+
- lcof2/**
10+
- lcof/**
11+
- lcci/**
12+
- basic/**
13+
pull_request:
14+
paths:
15+
- solution/**
16+
- lcs/**
17+
- lcp/**
18+
- lcof2/**
19+
- lcof/**
20+
- lcci/**
21+
- basic/**
22+
23+
concurrency:
24+
group: ${{github.workflow}} - ${{github.ref}}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: jpetrucciani/[email protected]
34+
with:
35+
black_flags: '-S'
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: clang-format-linter
2+
3+
on:
4+
push:
5+
paths:
6+
- solution/**
7+
- lcs/**
8+
- lcp/**
9+
- lcof2/**
10+
- lcof/**
11+
- lcci/**
12+
- basic/**
13+
pull_request:
14+
paths:
15+
- solution/**
16+
- lcs/**
17+
- lcp/**
18+
- lcof2/**
19+
- lcof/**
20+
- lcci/**
21+
- basic/**
22+
23+
concurrency:
24+
group: ${{github.workflow}} - ${{github.ref}}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
build:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: DoozyX/[email protected]
34+
with:
35+
source: '.'
36+
extensions: 'c,cpp,java'
37+
clangFormatVersion: 16

0 commit comments

Comments
 (0)