万本电子书0元读

万本电子书0元读

顶部广告

Learn Data Structures and Algorithms with Golang电子书

售       价:¥

10人正在读 | 0人评论 9.8

作       者:Bhagvan Kommadi

出  版  社:Packt Publishing

出版时间:2019-03-30

字       数:30.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Explore Golang's data structures and algorithms to design, implement, and analyze code in the professional setting Key Features * Learn the basics of data structures and algorithms and implement them efficiently * Use data structures such as arrays, stacks, trees, lists and graphs in real-world scenarios * Compare the complexity of different algorithms and data structures for improved code performance Book Description Golang is one of the fastest growing programming languages in the software industry. Its speed, simplicity, and reliability make it the perfect choice for building robust applications. This brings the need to have a solid foundation in data structures and algorithms with Go so as to build scalable applications. Complete with hands-on tutorials, this book will guide you in using the best data structures and algorithms for problem solving. The book begins with an introduction to Go data structures and algorithms. You'll learn how to store data using linked lists, arrays, stacks, and queues. Moving ahead, you'll discover how to implement sorting and searching algorithms, followed by binary search trees. This book will also help you improve the performance of your applications by stringing data types and implementing hash structures in algorithm design. Finally, you'll be able to apply traditional data structures to solve real-world problems. By the end of the book, you'll have become adept at implementing classic data structures and algorithms in Go, propelling you to become a confident Go programmer. What you will learn * Improve application performance using the most suitable data structure and algorithm * Explore the wide range of classic algorithms such as recursion and hashing algorithms * Work with algorithms such as garbage collection for efficient memory management * Analyze the cost and benefit trade-off to identify algorithms and data structures for problem solving * Explore techniques for writing pseudocode algorithm and ace whiteboard coding in interviews * Discover the pitfalls in selecting data structures and algorithms by predicting their speed and efficiency Who this book is for This book is for developers who want to understand how to select the best data structures and algorithms that will help solve coding problems. Basic Go programming experience will be an added advantage.
目录展开

About Packt

Why subscribe?

Packt.com

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Section 1: Introduction to Data Structures and Algorithms and the Go Language

Data Structures and Algorithms

Technical requirements

Classification of data structures and structural design patterns

Classification of data structures

Lists

Tuples

Heaps

Structural design patterns

Adapter

Bridge

drawShape method

drawContour method

Composite

Decorator

Facade

Flyweight

Private class data

Proxy

Representation of algorithms

Flow chart

Pseudo code

Complexity and performance analysis

Complexity analysis of algorithms

Big O notation

Linear complexity

Quadratic complexity

Cubic complexity

Logarithmic complexity

Brute force algorithms

Divide and conquer algorithms

Backtracking algorithms

Summary

Questions and exercises

Further reading

Getting Started with Go for Data Structures and Algorithms

Technical requirements

Arrays

Slices

The len function

Slice function

Two-dimensional slices

Maps

Database operations

The GetCustomer method

The InsertCustomer method

Variadic functions

The update operation

The delete operation

CRUD web forms

The defer and panic statements

The InsertCustomer method

The UpdateCustomer method

The DeleteCustomer method

CRM web application

The Create function

The Insert function

The Alter function

The Update function

The Delete function

The main method

The Header template

The Footer template

The Menu template

The Create template

The Update template

The View template

Summary

Questions

Further reading

Section 2: Basic Data Structures and Algorithms using Go

Linear Data Structures

Technical requirements

Lists

LinkedList

The Node class

The LinkedList class

The AddToHead method

The IterateList method

The LastNode method

The AddToEnd method

The NodeWithValue method

The AddAfter method

The main method

Doubly linked list

The NodeBetweenValues method

The AddToHead method

AddAfter method

The AddToEnd method

The main method

Sets

The AddElement method

The DeleteElement method

The ContainsElement method

The main method – contains element

The InterSect method

The Union method

The main method – intersection and union

Tuples

Queues

The New method

The Add method

The main method – queues

Synchronized queue

The New method

The StartTicketIssue method

The EndTicketIssue method

The ticketIssue method

The StartPass method

The EndPass method

The passenger method

The main method

Stacks

The New method

The Push method

The Pop method

The main method

Summary

Questions

Further reading

Non-Linear Data Structures

Technical requirements

Trees

Binary search tree

The BinarySearchTree class

The InsertElement method

The insertTreeNode method

The inOrderTraverse method

The inOrderTraverseTree method

The PreOrderTraverseTree method

The preOrderTraverseTree method

The PostOrderTraverseTree method

The postOrderTraverseTree method

The MinNode method

The MaxNode method

The SearchNode method

The searchNode method

The RemoveNode method

The removeNode method

The String method

The stringify method

The main method

Adelson, Velski, and Landis (AVL) tree

The KeyValue interface

The TreeNode class

The opposite method

The singleRotation method

The doubleRotation method

The adjustBalance method

The BalanceTree method

The insertRNode method

The InsertNode method

The RemoveNode method

The removeBalance method

The removeRNode method

The main method

B+ tree

B-tree

T-tree

Tables

The Table class

The Row class

The Column class

The printTable method

The main method

Symbol tables

Containers

Circular linked list

The hash functions

Summary

Questions

Further reading

Homogeneous Data Structures

Technical requirements

Two-dimensional arrays

Row matrix

Column matrix

Lower triangular matrix

Upper triangular matrix

Null matrix

Identity matrix

Symmetric matrix

Basic 2D matrix operations

The add method

The subtract method

The multiply method

The transpose method

The determinant method

The inverse method

Zig-zag matrix

Spiral matrix

Boolean matrix

The printMatrix method

The main method

Multi-dimensional arrays

Tensors

Summary

Questions

Further reading

Heterogeneous Data Structures

Technical requirements

Linked lists

Singly linked lists

The CreateLinkedList method

The ReverseLinkedList method

The main method

Doubly linked lists

Circular-linked lists

The CircularQueue class

The NewQueue method

The IsUnUsed method

The IsComplete method

The Add method

The MoveOneStep method

The main method

Ordered lists

The ToString method

The SortByAge type

The Thing class

The ByFactor function type

The Sort method

Thing sorter class

The len, swap, and less methods

The main method

The struct type

The multiSorter class

The Sort method

The OrderBy method

The len method

The Swap method

The less method

The main method

Unordered lists

The UnOrderedList class

The AddtoHead method

The IterateList method

The main method

Summary

Questions

Further reading

Dynamic Data Structures

Technical requirements

Dictionaries

DictVal type

Dictionary class

Put method

Remove method

Contains method

Find method

Reset method

NumberOfElements method

GetKeys method

GetValues method

The main method

TreeSets

InsertTreeNode method

Delete method

InOrderTraverseTree method

The inOrderTraverseTree method

PreOrderTraverseTree method

The preOrderTraverseTree method

Search method

The String method

The main method

Synchronized TreeSets

Mutable TreeSets

RemoveNode method

Treeset.bst

Sequences

Farey sequence

String method

The g method

The main method

Fibonacci sequence

FibonacciNumber method

Main method

Look-and-say

Thue–Morse

Summary

Questions

Further reading

Classic Algorithms

Technical requirements

Sorting

Bubble

Selection

The swap method

The main method

Insertion

InsertionSorter method

The main method

Shell

The power method

The main method

Merge

MergeSorter method

JoinArrays method

The main method

Quick

The divideParts method

The swap method

The main method

Searching

Linear

Binary

Interpolation

Recursion

Hashing

The CreateHashMutliple method

The XOR method

The main method

Summary

Questions

Further reading

Section 3: Advanced Data Structures and Algorithms using Go

Network and Sparse Matrix Representation

Technical requirements

Network representation using graphs

The Link class

The NewSocialGraph method

The AddLink method

The PrintLinks method

The main method

Test

Representing a social network

The NewSocialGraph method

The AddEntity method

The AddLink method

The PrintLinks method

The main method

Map layouts

The MapLayout class

The NewMapLayout method

The AddPlace method

The AddLink method

The PrintLinks method

The main method

Test

Knowledge graphs

The KnowledgeGraph class

The NewKnowledgeGraph method

The AddClass method

The AddLink method

The PrintLinks method

The main method

Test

Sparse matrix representation using a list of lists

SparseMatrix class

The Shape method

The NumNonZero method

The LessThan method

The Equal method

The GetValue method

The SetValue method

The NewSparseMatrix method

The main method

Summary

Questions

Further reading

Memory Management

Technical requirements

Garbage collection

The ReferenceCounter class

The newReferenceCounter method

The Stack class

The Stack class – a new method

The main method

Reference counting

Simple reference counting

Deferred reference counting

One-bit reference counting

Weighted reference counting

The mark-and-sweep algorithm

The generational collection algorithm

Cache management

The CacheObject class

The IfExpired method

The Cache class

The NewCache method

The GetObject method

The SetValue method

The main method

Space allocation

Pointers

The addOne method

The main method

Concepts – Go memory management

Profiling

Summary

Questions

Further reading

Next Steps

Technical requirements

Learning outcomes

Key takeaways

Next steps

Chapter 1 – Data Structures and Algorithms

Chapter 2 – Getting Started with Go for Data Structures and Algorithms

Chapter 3 – Linear Data Structures

Chapter 4 – Non-Linear Data Structures

Chapter 5 – Homogeneous Data Structures

Chapter 6 – Heterogeneous Data Structures

Chapter 7 – Dynamic Data Structures

Chapter 8 – Classic Algorithms

Chapter 9 – Network and Sparse Matrix Representation

Chapter 10 – Memory Management

Tips and techniques

Using channel with a timeout interval

Using context instead of channel

Logging with the line number

Go tool usage

Go environment variables

Test table

Importing packages

Panic, defer, and recover

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部