加载中
Golang program for implementation of Linked List

In computer science, a linked list is a linear collection of data elements, in which linear order is not given by their physical placement in memory. Each pointing to the next n...

2018/03/14 15:54
121
GO 快速排序

package main import (   "fmt"   "math/rand"   "time" ) func main() {   slice := generateSlice(20)   fmt.Println("\n ----- Unsorted ----- \n\n", slice)   quicksort(slice)   fmt.Printl...

2018/03/13 16:56
232
Golang Slice interface and array concatenation

package main import ( "fmt" ) func main() { // Slice Concatenation a := []int{1, 2, 3} b := []int{7, 12, 60} c := append(a, b...) fmt.Println(c) /...

2018/03/13 16:29
222
cpp test

#include <iostream> #include <string> using namespace std; class RunClass{ public: RunClass() {} ~RunClass() {} public: int FuncTest1(const st...

cpp
2018/03/12 17:43
160
CPP 模板测试

#include <iostream> using namespace std; class A { public: void print() { cout << "class A!" << endl; } }; class B { public: vo...

2018/03/01 17:25
118
Go 生成图片

package main import (   "image"   "image/color"   "image/draw"   "image/png"   "log"   "os" ) func main() {   rectangle := "rectangle.png"   rectImage := image.NewRGBA(image.Rect(0,...

2018/02/11 11:12
6.9K
Go Slice 去重

package main import ( "fmt" ) func unique(intSlice []int) []int { keys := make(map[int]bool) list := []int{} for _, entry := range intSlice { if _, va...

2018/02/09 17:28
2.1K
Go 语言中struct, slice , map 比较

package main import ( "fmt" "reflect" ) type testStruct struct { A int B string C []int } func main() { st1 := testStruct{A:100,B:"Australia",C:[]int{1,2,3...

2018/02/09 16:48
345
Go 语言 bytes.FieldsFunc 函数的使用

package main import (   "bytes"   "fmt"   "reflect"   "strings" ) func main() {   sentence := []byte("The Go language has built-in facilities, as well as library support, for writ...

2018/02/09 16:34
1.4K
Go 结构体

package main import (   "fmt"   "reflect" ) type Book struct {   Id int   Title string   Price float32   Authors []string } func aboutStruct() {   book := Book{Id: 100, Tit...

2018/02/09 15:49
136
Go 类型识别 array 与 slice

// Base project main.go package main import (   "fmt"   "reflect" ) func main() {   arr1 := [...]int{1, 2, 3, 4, 5, 6}   arr2 := []int{1, 2, 3, 4, 5, 6}   fmt.Println("arr1 Type :...

2018/02/09 10:42
152
Go 时间基本处理

package main import (   "fmt"   "reflect"   "time" ) func main() {   now := time.Now()   fmt.Println("now = ", now)   fmt.Println("type of now = ", reflect.TypeOf(now))   year := no...

2018/02/08 15:48
185

没有更多内容

加载失败,请刷新页面

返回顶部
顶部