-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
79 lines (74 loc) · 2.39 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
package main
import (
advancedtasks "tasks/advancedtasks/develop/dev_01"
"tasks/algorithms"
"tasks/basetasks"
"tasks/pattern"
)
func main() {
// --- basetasks functions call --- you should uncomment one of the function
basetasks.TaskOne()
//basetasks.TaskTwo([]int{1, 2, 3, 4})
//basetasks.TaskThree()
//basetasks.TaskFive()
//basetasks.TaskSeventeen([]int{1, 3, 5, 8, 15}, 8)
//basetasks.TaskSixteen([]int{83, 32, 4, 7, 1, 3, 5, 8, 15})
//basetasks.TaskNineteen("главрыба")
//basetasks.TaskTwenty("snow dog sun")
//basetasks.TaskTwentyThee([]int{1, 2, 3, 4, 5}, 2)
//basetasks.TaskTwentySix("THeMessage")
//basetasks.TaskTwentyFive()
//basetasks.TaskTwentyFour()
//basetasks.TaskTwentyTwo()
//basetasks.TaskTwentyOne()
//basetasks.TaskEighteen()
//basetasks.TaskFifteen()
//basetasks.TaskFourteen()
//basetasks.TaskThirteen()
//basetasks.TaskFour()
//basetasks.TaskSeven()
//basetasks.TaskEight()
//basetasks.TaskNine()
//basetasks.TaskTen()
//basetasks.TaskEleven()
//basetasks.TaskSix()
//basetasks.TaskTwelve()
// --- advancedtasks functions call --- you should uncomment one of the function
advancedtasks.TaskOne()
//advancedtasks2.TaskTwo()
//advancedtasks3.TaskThree()
//advancedtasks4.TaskFour()
//advancedtasks5.TaskFive()
//advancedtasks6.TaskSix()
//advancedtasks7.TaskSeven()
//advancedtasks8.TaskEight()
//advancedtasks9.TaskNine()
//advancedtasks10.TaskTen()
// --- pattern call --- you should uncomment one of the pattern
//01 - Facade
facade := pattern.NewStart()
facade.Start()
//02 - Builder
//builder := pattern.NewCarBuilder()
//car := builder.Engine(623).Body("BMW").Wheels("Yokohama").Build()
//fmt.Println(car)
//03 - Visitor
//pattern.VisitorPatternStart()
//04 - Command
//pattern.CommandPatternStart()
//05 - Chain of responsibility
//pattern.ChainPatternStart()
//06 - Factory method
//pattern.FactoryMethodPatternStart()
//07 - Strategy
//pattern.StrategyPatternStart()
//08 - State
//pattern.StatePatternStart()
// --- algorithms call --- you should uncomment one of the algorithm
algorithms.AddZero([][]string{{"7", "3", "1"}, {"2", "9"}})
//algorithms.BinarySearch([]string{"Akron", "Aksum", "Aktobe", "Aktyubinsk", "Akubra", "Akure"}, "Akubra")
//algorithms.DivideStr([]string{"71", "90"})
//algorithms.QuickSort([]int{5, 6, 7, 8, 2, 1})
//algorithms.RecSum([]int{2, 4, 5}, 3)
//algorithms.SelectionSort([]int{5, 6, 7, 8, 2, 1})
}