Commit graph

61 commits

Author SHA1 Message Date
Yudong Jin
ae78126d80
Update array.go 2022-12-30 16:44:09 +08:00
龚国玮
4fb267918b docs(array): add file author, created time 2022-12-29 10:06:11 +08:00
龚国玮
f0c3bf5766 docs(array): reduce understanding cost
- 去除了并行测试;
- 基于 Java 代码样例,统一了命名风格;
- 基于 Go link 模块代码样例,统一了测试用例风格;
- 我们将 Go 中的 Slice 切片看作 Array 数组。因为这样可以降低理解成本,利于我们将关注点放在数据结构与算法上。
2022-12-28 10:46:12 +08:00
龚国玮
b1be0aab15 docs(array): sample code for golang
本次提交包含如下示例代码。
- 遍历数组;
- 初始化数组;
- 扩展数组长度;
- 在数组中查找指定元素;
- 随机返回一个数组元素;
- 删除索引 index 处元素;
- 在数组的索引 index 处插入元素 num。

所有数组约定长度为 5。原因如下:
在 goalng 中,必须声明数组的长度,例如:nums := [5]int{1,2,3,4,5}。如果不声明长度,则被称为切片。

使用的注释没有按照 golang 的编程惯例,而是倾向于使用文档上下文的注释约定。
所以所有函数注释均使用了 `/* ... */`,而不是双斜杠 `//`。
2022-12-27 11:25:30 +08:00
Yudong Jin
01b6c8bb0a Fix my list. 2022-12-25 12:58:35 +08:00
Yudong Jin
f3ef226874 Remove the spaces between “ ” and 中文 aside. 2022-12-21 01:37:58 +08:00
machangxin
4fa41ce08a fixed clear list in Go 2022-12-18 21:57:29 +08:00
machangxin
c5f7faaf15 list using go 2022-12-18 14:55:14 +08:00
machangxin
2305b09db4 Supplement linear_search documentation 2022-12-17 15:14:38 +08:00
machangxin
e0721dde05 function PrintSlice supports Generics 2022-12-17 14:59:21 +08:00
machangxin
ba5b5a1f09 function PrintMap supports Generics 2022-12-16 17:03:41 +08:00
machangxin
26ad485dd2 Add function PrintMap() in Go 2022-12-16 10:55:28 +08:00
马赛克
e432f0b987
Merge branch 'krahets:master' into master 2022-12-16 09:18:48 +08:00
Yudong Jin
c071ab88d2 Update hash map 2022-12-15 23:08:07 +08:00
Cathay
5617f8246f feat(space_complexity): add the Go code to space complexity docs (Chapter of Computational Complexity) 2022-12-15 16:41:47 +08:00
machangxin
1229f98e92 Fixed some problems, indentation and Pointer 2022-12-15 09:43:20 +08:00
machangxin
aeb4e6077d Add C++, Python, Go code for chapter_hashing 2022-12-14 17:18:32 +08:00
machangxin
8ff1e32426 update annotation 2022-12-13 23:50:49 +08:00
Yudong Jin
bec787b751 Update time complexity and space complexity. 2022-12-13 23:24:12 +08:00
Yudong Jin
f0c6de961a Update the chapter of time complexity. 2022-12-13 23:23:24 +08:00
Yudong Jin
d2d7560aad Update merge_sort.go 2022-12-13 22:46:23 +08:00
machangxin
1ec97120a9 add worst_best_time_complexity.go 2022-12-13 17:53:23 +08:00
machangxin
4d3128a4a7 merge sort using go 2022-12-13 14:24:17 +08:00
machangxin
7dc1dd54d4 Add annotation 2022-12-13 09:53:17 +08:00
machangxin
d4ad75eb7d time complexity using go 2022-12-13 09:24:59 +08:00
Yudong Jin
a5b473f718
Merge pull request #96 from Slone123c/patch
Hashing search and test using go
2022-12-13 00:21:38 +08:00
chenshilong
bb24e8083a 1. Code formatted 2022-12-12 23:17:33 +08:00
Yudong Jin
e4f202b993 Update Go code of quick sort. 2022-12-12 23:12:05 +08:00
Yudong Jin
7c34e5b268 Merge branch 'master' of github.com:krahets/hello-algo
merge
2022-12-12 23:09:48 +08:00
machangxin
e862a06c4c Quick sort using go 2022-12-12 21:33:53 +08:00
Yudong Jin
d612bea748 Fix the Go code of insertion sort. 2022-12-12 20:03:34 +08:00
machangxin
e2ae907cd1 Insertion sort using go 2022-12-12 18:50:22 +08:00
machangxin
51a6f374a7 Insertion sort using go 2022-12-12 18:32:58 +08:00
chenshilong
c5e5be07b8 1. Hashing search and test using go 2022-12-12 16:41:41 +08:00
chenshilong
78901d8689 1. Hashing search and test using go 2022-12-12 16:36:29 +08:00
chenshilong
8643efece9 1.bubble sort using go
2.test edited
2022-12-07 18:38:12 +08:00
chenshilong
10b1216675 bubble sort using go 2022-12-06 23:41:12 +08:00
Yudong Jin
1f24a7c75d
Update binary_search_test.go 2022-12-05 22:32:56 +08:00
Yudong Jin
bb00bb8620
Update binary_search.go 2022-12-05 22:32:08 +08:00
Slone
27e993e6df
binary_search_test_ edited time 2022-12-05 20:45:46 +08:00
Slone
829e13494e
binary_search.go and binary_search_test uploaded 2022-12-05 20:39:42 +08:00
Yudong Jin
ebf9024136 Add Go codes to docs, including
the chapter of stack and queue, the chapter of tree.
2022-12-03 20:25:24 +08:00
Yudong Jin
e20bc251f5 Add python code of chapter queue to docs. 2022-12-02 00:09:34 +08:00
reanon
a554590fa8 feat(deque): add implementation of deque 2022-11-29 10:46:25 +08:00
reanon
19469aecbf fix(go): modify interface of stack, queue and deque 2022-11-29 10:44:31 +08:00
reanon
d32f15feb1 fix(testcase): modify testcase 2022-11-29 10:44:31 +08:00
reanon
bed8b07b0b feat(deeue): implement deque in golang code 2022-11-29 10:44:31 +08:00
reanon
76a7e0b232 feat(queue): implement queue in golang code 2022-11-29 10:44:31 +08:00
reanon
27e4402eca feat(stack): implement stack in golang code 2022-11-29 10:44:31 +08:00
reanon
67409cdb12 fix(tree): amend tree in golang 2022-11-29 10:44:31 +08:00