1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-07 06:02:27 +08:00

doc: update doc styles

This commit is contained in:
dudaodong
2023-08-30 11:59:04 +08:00
parent 03d331dfb6
commit 21a952d2be
40 changed files with 839 additions and 901 deletions

View File

@@ -39,8 +39,6 @@ import (
<div STYLE="page-break-after: always;"></div>
<link rel="stylesheet" type="text/css" href="/styles/api_doc.css">
## 文档
### <span id="BubbleSort">BubbleSort</span>
@@ -53,7 +51,7 @@ import (
func BubbleSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/GNdv7Jg2Taj)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/GNdv7Jg2Taj)</span></b>
```go
package main
@@ -101,7 +99,7 @@ func main() {
func InsertionSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/G5LJiWgJJW6)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/G5LJiWgJJW6)</span></b>
```go
package main
@@ -164,7 +162,7 @@ func main() {
func SelectionSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/oXovbkekayS)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/oXovbkekayS)</span></b>
```go
package main
@@ -212,7 +210,7 @@ func main() {
func ShellSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/3ibkszpJEu3)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/3ibkszpJEu3)</span></b>
```go
package main
@@ -260,7 +258,7 @@ func main() {
func QuickSort[T any](slice []T comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/7Y7c1Elk3ax)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/7Y7c1Elk3ax)</span></b>
```go
package main
@@ -308,7 +306,7 @@ func main() {
func HeapSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/u6Iwa1VZS_f)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/u6Iwa1VZS_f)</span></b>
```go
package main
@@ -356,7 +354,7 @@ func main() {
func MergeSort[T any](slice []T, comparator lancetconstraints.Comparator)
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/ydinn9YzUJn)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/ydinn9YzUJn)</span></b>
```go
package main
@@ -404,7 +402,7 @@ func main() {
func CountSort[T any](slice []T, comparator lancetconstraints.Comparator) []T
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/tB-Umgm0DrP)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/tB-Umgm0DrP)</span></b>
```go
package main
@@ -453,7 +451,7 @@ func main() {
func BinarySearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int
```
<b>示例: <span class="run-container">[运行](https://go.dev/play/p/t6MeGiUSN47)</span></b>
<b>示例: <span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/t6MeGiUSN47)</span></b>
```go
package main
@@ -504,7 +502,7 @@ func main() {
func BinaryIterativeSearch[T any](sortedSlice []T, target T, lowIndex, highIndex int, comparator lancetconstraints.Comparator) int
```
<b>示例: <span class="run-container">[运行](https://go.dev/play/p/Anozfr8ZLH3)</span></b>
<b>示例: <span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/Anozfr8ZLH3)</span></b>
```go
package main
@@ -555,7 +553,7 @@ func main() {
func LinearSearch[T any](slice []T, target T, equal func(a, b T) bool) int
```
<b>示例: <span class="run-container">[运行](https://go.dev/play/p/IsS7rgn5s3x)</span></b>
<b>示例: <span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/IsS7rgn5s3x)</span></b>
```go
package main
@@ -598,7 +596,7 @@ func (l *LRUCache[K, V]) Delete(key K) bool
func (l *LRUCache[K, V]) Len() int
```
<b>示例:<span class="run-container">[运行](https://go.dev/play/p/-EZjgOURufP)</span></b>
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/-EZjgOURufP)</span></b>
```go
package main