Sherlock Blaze

I bloom in the slaughter, like the flowers of the dawn

Goroutines

GoroutinesMany concepts that were previously considered academic and inefficient are beginning to find a place among modern software solutions. Two such concepts are coroutines(goroutines in Go) an......

docker introduction

ContainersDuring the 1990s and early 2000s, the standard way to deploy applications to the internet was to get a server instance, copy the code or binary onto the instance, and then start the progr......

Golang 高并发初步

通常程序会被编写为一个顺序执行并完成一个独立任务的代码。如果没有特别的需求,最好总是这样写代码。 但是有些情况并行执行多个任务会有更大的好处。比如说: Web 服务需要在各自独立的套接字(socket)上同时接受多个请求数据。每个套接字请求都是独立的,可以完全独立于其他套接字进行处理。具有并行执行多个请求的能力可以显著提高这类系统的性能。 Golang 中并发指能让某个函数独立于其他函数运行......

Golang 基本语法

本学习笔记总结自: 《Go in Action》 先讨论一些规范问题: 如何将代码组织成包 如何操作这些包 包有这么一些目录,目录下存放一些列以 .go 为扩展名的相关文件,这个目录,称之为包。 同一个目录下的所有 .go 文件必须声明为同一个包名,比如包为 beauty,则需要在代码中标明 package beauty。 main 包所有用 Go 语言编译的可执行程序都必须有一个名......

Golang 初探

本学习笔记总结自: 《Go in Action》 优势 Golang 是一种让代码分享更加容易的编程语言 提供了更高效的代码复用手段 高效利用服务器上的所有核心 编译速度很快,即使是大型项目 开发速度快 现代化的内存管理机制 类型系统 类型简单。类型之间更多使用了组合的方式,而非继承 利用接口对一组行为建模。利用了鸭子类型,即一个东西看起来是只鸭子,那它就是只鸭子 Hello Wor......

Trees

Basic Concept Of TreeFirst, let’s talk about tree. Why we need Tree??? We you get large amounts of input, the linear access time of linked lists is prohibitive. Using a sequential table structure c......

Avl Tree

DefinitionAVL Tree – Adelson-Velskii and Landis. It’s a binary tree with a balance condition. And we get the balance condition must be easy to maintain, and it ensures that the depth of the tree i......

Red-Black Trees

What’s it for?We got a binary search tree, and we know that a binary search tree of height h can support any of the basic dynamic-set operations - such as Search, Predecessor – in O(h) time. The se......

Binary Search Tree

DefinitionSearching is the most useful application of binary trees. There’re two binary tree. But only the left one is binary search tree. So, what makes a binary tree into a binary search tree? ......

Binary Tree

DefinitionsA binary tree is a tree in which NO node can have more than two children. It’s look like this. No node have more than two children !!! Other than this, there is no more difference with......