mirror of
				https://github.com/krahets/hello-algo.git
				synced 2025-11-04 06:07:20 +08:00 
			
		
		
		
	Update stack in Go
This commit is contained in:
		@ -119,7 +119,7 @@ comments: true
 | 
			
		||||
 | 
			
		||||
=== "Go"
 | 
			
		||||
 | 
			
		||||
    ```go title="deque.go"
 | 
			
		||||
    ```go title="deque_test.go"
 | 
			
		||||
    /* 初始化双向队列 */
 | 
			
		||||
    // 在 Go 中,将 list 作为双向队列使用
 | 
			
		||||
    deque := list.New()
 | 
			
		||||
 | 
			
		||||
@ -114,7 +114,7 @@ comments: true
 | 
			
		||||
 | 
			
		||||
=== "Go"
 | 
			
		||||
 | 
			
		||||
    ```go title="queue.go"
 | 
			
		||||
    ```go title="queue_test.go"
 | 
			
		||||
    /* 初始化队列 */
 | 
			
		||||
    // 在 Go 中,将 list 作为队列来使用
 | 
			
		||||
    queue := list.New()
 | 
			
		||||
 | 
			
		||||
@ -114,7 +114,7 @@ comments: true
 | 
			
		||||
 | 
			
		||||
=== "Go"
 | 
			
		||||
 | 
			
		||||
    ```go title="stack.go"
 | 
			
		||||
    ```go title="stack_test.go"
 | 
			
		||||
    /* 初始化栈 */
 | 
			
		||||
    // 在 Go 中,推荐将 Slice 当作栈来使用
 | 
			
		||||
    var stack []int
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user