Learn Data Structures and Algorithms with Golang
上QQ阅读APP看书,第一时间看更新

Getting Started with Go for Data Structures and Algorithms

The Go programming language has been rapidly adopted by developers for building web applications. With its impressive performance and ease of development, Go enjoys the support of a wide variety of open source frameworks for building scalable and highly performant web services and apps. The migration to Golang has taken place mainly because of its fast, lightweight, and inbuilt concurrency features. This brings with it the need to learn data structures and algorithms with this growing language.

In data structures, a collection of elements of a single type is called an array. Slices are similar to arrays except that they have unusual properties. Slice operations such as enlarging a slice using append and copy methods, assigning parts of a slice, appending a slice, and appending a part of a slice are presented with code samples. Database operations and CRUD web forms are the scenarios in which Go data structures and algorithms are demonstrated.

In this chapter, we will discuss the following Go language-specific data structures:

  • Arrays
  • Slices
  • Two-dimensional slices
  • Maps
  • Database operations
  • Variadic functions
  • CRUD web forms