Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2d09742

Browse files
refactor
1 parent 12948b4 commit 2d09742

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

‎src/main/java/ir/sk/helper/framworks.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Frameworks: are used in paradigms and patterns
1+
#Frameworks: are used in paradigms and patterns
22
## method:
33
1. clarification: constraints
44
2. ideas: ( 1. brute force algorithm 2. ...)
@@ -16,15 +16,15 @@
1616
3. load test
1717

1818

19-
##Array traversal framework, typical linear iterative structure:
19+
##Array traversal framework, typical linear iterative structure:
2020
```
2121
void traverse(int[] arr) {
2222
for (int i = 0; i < arr.length; i++) {
2323
// iteratively visit arr[i]
2424
}
2525
}
2626
```
27-
##Linked list traversal framework has both iterative and recursive structure:
27+
##Linked list traversal framework has both iterative and recursive structure:
2828
```
2929
/* Basic node of the single linked list */
3030
class Link {
@@ -46,7 +46,7 @@ void traverse(Link head) {
4646
}
4747
```
4848
Remember using previous, current, next pointers when is needed
49-
##Binary tree traversal framework, typical nonlinear recursive traversal structure:
49+
##Binary tree traversal framework, typical nonlinear recursive traversal structure:
5050
```
5151
/* Basic node of the binary tree */
5252
class TreeNode {
@@ -64,7 +64,7 @@ void DFSTraverse(Node root) {
6464
}
6565
```
6666

67-
##the framework for almost all BT resolve
67+
##the framework for almost all BT resolve
6868
1. base case
6969
2. recursive on left;
7070
3. recursive on right;
@@ -94,7 +94,7 @@ void BFSTraverse(Node root) {
9494
}
9595
```
9696

97-
##There is a template for backtracking algorithms:
97+
##There is a template for backtracking algorithms:
9898
```
9999
result = []
100100
def backtrack(Path, selection List):
@@ -109,9 +109,9 @@ def backtrack(Path, selection List):
109109
```
110110

111111

112-
##template for Sliding Window Algorithm pattern:
113-
###[window)
114-
####Static
112+
##template for Sliding Window Algorithm pattern:
113+
###[window)
114+
####Static
115115
```
116116
int left = 0, right = k;
117117
for (int i = 0; i < k; i++)
@@ -124,7 +124,7 @@ while (right < s.size()) {
124124
left++;
125125
}
126126
```
127-
####Dynamic
127+
####Dynamic
128128
```
129129
int left = 0, right = 0;
130130
@@ -139,7 +139,7 @@ while (right < s.size()) {
139139
}
140140
```
141141

142-
##template for recurtion by sample:
142+
##template for recurtion by sample:
143143
How many hairs does Monkey King have? Answer: One plus the rest.
144144

145145
How old are you this year? Answer: One year plus my age of last year, I was born in 1999.
@@ -150,4 +150,4 @@ int func(How old are you this year) {
150150
// self-calling to decompose problem
151151
return func(How old are you last year) + 1;
152152
}
153-
```
153+
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /