Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Data Structures and Algorithms with Golang

You're reading from   Learn Data Structures and Algorithms with Golang Level up your Go programming skills to develop faster and more efficient code

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher Packt
ISBN-13 9781789618501
Length 336 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Bhagvan Kommadi Bhagvan Kommadi
Author Profile Icon Bhagvan Kommadi
Bhagvan Kommadi
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Section 1: Introduction to Data Structures and Algorithms and the Go Language
2. Data Structures and Algorithms FREE CHAPTER 3. Getting Started with Go for Data Structures and Algorithms 4. Section 2: Basic Data Structures and Algorithms using Go
5. Linear Data Structures 6. Non-Linear Data Structures 7. Homogeneous Data Structures 8. Heterogeneous Data Structures 9. Dynamic Data Structures 10. Classic Algorithms 11. Section 3: Advanced Data Structures and Algorithms using Go
12. Network and Sparse Matrix Representation 13. Memory Management 14. Next Steps 15. Other Books You May Enjoy

What this book covers

Chapter 1, Data Structures and Algorithms, focuses on the definition of abstract data types, classifying data structures into linear, non-linear, homogeneous, heterogeneous, and dynamic types. Abstract data types, such as container, list, set, map, graph, stack, and queue, are presented in this chapter. This chapter also covers the performance analysis of data structures, as well as the correct choice of data structures and structural design patterns.

Chapter 2, Getting Started with Go for Data Structures and Algorithms, covers Go-specific data structures, such as arrays, slices, two-dimensional slices, maps, structs, and channels. Variadic functions, deferred function calls, and panic and recover operations are introduced. Slicing operations, such as enlarging using append and copy, assigning parts, appending a slice, and appending part of a slice, are also presented in this chapter.

Chapter 3, Linear Data Structures, covers linear data structures such as lists, sets, tuples, stacks, and heaps. The operations related to these types, including insertion, deletion, updating, reversing, and merging are shown with various code samples. In this chapter, we present the complexity analysis of various data structure operations that display accessing, search, insertion, and deletion times.

Chapter 4, Non-Linear Data Structures, covers non-linear data structures, such as trees, tables, containers, and hash functions. Tree types, including binary tree, binary search tree, T-tree, treap, symbol table, B- tree, and B+ tree, are explained with code examples and complexity analysis. Hash function data structures are presented, along with examples in cryptography for a variety of scenarios, such as open addressing, linear probing, universal hashing, and double hashing.

Chapter 5, Homogeneous Data Structures, covers homogeneous data structures such as two-dimensional and multi-dimensional arrays. Array shapes, types, literals, printing, construction, indexing, modification, transformation, and views are presented together with code examples and performance analysis. Matrix representation, multiplication, addition, subtraction, inversion, and transpose scenarios are shown to demonstrate the usage of multi-dimensional arrays.

Chapter 6, Heterogeneous Data Structures, covers heterogeneous data structures, such as linked lists, ordered, and unordered lists. We present the singly linked list, doubly linked list, and circular linked list, along with code samples and efficiency analysis. Ordered and unordered lists from HTML 3.0 are shown to demonstrate the usage of lists and storage management.

Chapter 7, Dynamic Data Structures, covers dynamic data structures, such as dictionaries, TreeSets, and sequences. Synchronized TreeSets and mutable TreeSets are covered in this chapter along with Go code exhibits. Sequence types including Farey, Fibonacci, look-and-say, and Thue-Morse, are discussed with Go programs. This chapter also explains the usage anti-patterns of dictionaries, TreeSets, and sequences.

Chapter 8, Classic Algorithms, covers pre-order, post-order, in-order, level-order tree traversals and linked list traversals. Sorting algorithms, such as bubble, selection, insertion, shell, merge, and quick are explained with code exhibits. Search algorithms, as well as linear, sequential, binary, and interpolation methods, are also covered in this chapter. Recursion and hashing are shown by means of code samples.

Chapter 9, Network and Sparse Matrix Representation, covers data structures such as graphs and lists of lists. Different use cases from real-life applications, such as social network representation, map layouts, and knowledge catalogs, are shown with code examples and efficiency analysis.

Chapter 10, Memory Management, covers dynamic data structures, such as AVL trees and stack frames. Garbage collection, cache management, and space allocation algorithms are presented with code samples and efficiency analysis. Garbage collection algorithms, such as simple/deferred/one-bit/weighted reference counting, mark and sweep, and generational collection, are explained with an analysis of their advantages and disadvantages.

Appendix, Next Steps, shares the learning outcomes for the reader arising from the book. The code repository links and key takeaways are presented. References are included for the latest data structures and algorithms. Tips and techniques are provided to keep yourself updated with the latest on data structures and algorithms.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime