• HOME
  • SEARCH
  • TOPICS
  • DATA

  • 算法:递归-八皇后问题

    说明 一维数组即可表示。 数组的索引i表示第i+1行皇后。即:索引从0开始,表示第1行。 元素的值arr[i]=value,value表示第value+1列。若

    2021-02-01, Views: 2706 , Topics: 算法

  • 算法:迷宫问题-递归实现

    初始化迷宫 初始化一个8行7的二维数组。 maze := make([][7]int, 8) //Print(maze) for i := 0; i <

    2021-01-29, Views: 2671 , Topics: 算法

  • 算法:中缀表达式转后缀表达式

    调度场算法 中缀表达式转后缀表达式又称调度场算法。 可参考 维基百科:调度场算法 算法步骤 从左到右扫描中缀表达式 遇到操作数直接入栈s2 遇到运算符时,比较

    2021-01-28, Views: 2409 , Topics: 算法

  • 算法:解析中缀表达式

    说明 未考虑小数、负数、括号问题。 定义计算结构体 type Calculator struct { NumTop int Ope

    2021-01-27, Views: 2196 , Topics: 算法

  • 前缀表达式、中缀表达式、后缀表达式

    前缀表达式 Polish notation 又称波兰表达式,运算符位于操作数之前。 转换 (3+4)*5-6对应的前缀表达式为- * + 3 4 5 6。 扫描

    2021-01-26, Views: 4364 , Topics: 数据结构

  • 数据结构:栈-链表实现

    定义链表的节点 type Node struct { Value string Next *Node } 定义链表栈 type LinkedL

    2021-01-25, Views: 2679 , Topics: 数据结构

  • 数据结构:栈-数组实现

    定义数组栈 type ArrayStack struct { Top int Array []string } 定义入栈方法 func (s

    2021-01-22, Views: 2172 , Topics: 数据结构

  • 数据结构:环形链表-约瑟夫环

    定义节点 type CircularNode struct { No int Next *CircularNode } 定义环形链表 typ

    2021-01-21, Views: 2309 , Topics: 数据结构

  • 数据结构:双向链表

    定义双向节点 type DoublyNode struct { No int Name string Pre *DoublyNod

    2021-01-20, Views: 1960 , Topics: 数据结构

  • 数据结构:单向链表

    定义单链表结构体 定义了HeadNode头节点。 type SinglyLinkedList struct { HeadNode *Node } 定义节

    2021-01-19, Views: 2665 , Topics: 数据结构

  • 数据结构:队列-数组实现

    非循环 当head和tail索引到最后一位时,队列将无法再使用。 func main() { queue := &ArrayQueue{arr:

    2021-01-18, Views: 2605 , Topics: 数据结构

  • 数据结构:稀疏数组

    定义 稀疏固定有3列。 第一行为记录二维数组信息:第一行第一个元素为二维数组的行,第一行第二个元素为二维数组的列,第一行第三个元素为二维数组的非0个数。 第二行

    2021-01-17, Views: 2406 , Topics: 数据结构

  • Go flag 使用

    用途 使用命令行时指定字段赋值,类似Spring Boot以jar包方式启动时根据不同环境设置不同值。 示例 var s string var show bo

    2021-01-14, Views: 3362 , Topics: Go

  • Go 类型断言和类型转换

    示例 func main() { var i interface{} = "hello" s := i.(string) fmt.Pr

    2021-01-13, Views: 2145 , Topics: Go

  • Go 中的注释

    单行注释 // Add return a and b's sum func Add(a, b int) int { return a + b } //

    2021-01-12, Views: 3047 , Topics: Go

  • GoLand 提示 Receiver has generic name

    错误信息 The name of a method's receiver should be a reflection of its identity; of

    2021-01-08, Views: 4573 , Topics: GoLand Go

  • Spring Boot使用 Jackson 注解

    示例 Bean @Data //@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonIncl

    2021-01-07, Views: 2506 , Topics: Spring Boot Jackson JSON

  • Linux tcpdump 保存为 pcap 文件

    说明 pcap文件可适用Wireshark软件打开。 查看网卡 ifconfig 输出 eth0 Link encap:Ethernet HWadd

    2021-01-06, Views: 6378 , Topics: tcpdump Linux Wireshark

  • PostgreSQL distinct 和 distinct on 区别

    数据 city空值的为null z-blog=# select city, id, ip from ip_pool; city | id |

    2021-01-05, Views: 2808 , Topics: PostgreSQL

  • PostgreSQL update from 根据 A 表更新 B 表

    准备工作 -- 创建表1 create table t1(id integer, name text); -- 创建表2 create table t2(id

    2021-01-04, Views: 5428 , Topics: PostgreSQL

  • First Prev
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • Next Last

©2025 沪ICP备18012661号-1 阿里云

Messages Sitemap GitHub