36,59 €
Get started with C++ programming by learning how to build applications using its data structures and algorithms
Key Features
Book Description
C++ is a mature multi-paradigm programming language that enables you to write high-level code with a high degree of control over the hardware. Today, significant parts of software infrastructure, including databases, browsers, multimedia frameworks, and GUI toolkits, are written in C++.
This book starts by introducing C++ data structures and how to store data using linked lists, arrays, stacks, and queues. In later chapters, the book explains the basic algorithm design paradigms, such as the greedy approach and the divide-and-conquer approach, which are used to solve a large variety of computational problems. Finally, you will learn the advanced technique of dynamic programming to develop optimized implementations of several algorithms discussed in the book.
By the end of this book, you will have learned how to implement standard data structures and algorithms in efficient and scalable C++ 14 code.
What you will learn
Who this book is for
This book is for developers or students who want to revisit basic data structures and algorithm design techniques. Although no mathematical background is required, basic knowledge of complexity classes and Big O notation along with a qualification in an algorithms course will help you get the most out of this book. Familiarity with C++ 14 standard is assumed.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 575
Veröffentlichungsjahr: 2019
Leverage the power of modern C++ to build robust and scalable applications
John Carey
Shreyans Doshi
Payas Rajan
Copyright © 2019 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Authors: John Carey, Shreyans Doshi, and Payas Rajan
Technical Reviewer: Shubham Srivastava
Managing Editor: Aniket Shedge
Acquisitions Editors: Kunal Sawant and Sneha Shinde
Production Editor: Shantanu Zagade
Editorial Board: Shubhopriya Banerjee, Bharat Botle, Ewan Buckingham, Mahesh Dhyani, Manasa Kumar, Alex Mazonowicz, Bridget Neale, Dominic Pereira, Shiny Poojary, Abhisekh Rane, Erol Staveley, Ankita Thakur, Nitesh Thakur, and Jonathan Wray.
First Published: October 2019
Production Reference: 1311019
ISBN: 978-1-83882-884-4
Published by Packt Publishing Ltd.
Livery Place, 35 Livery Street
Birmingham B3 2PB, UK
This section briefly introduces the authors, the coverage of this book, the technical skills you'll need to get started, and the hardware and software requirements required to complete all of the included activities and exercises.
C++ is a mature multi-paradigm programming language that enables you to write high-level code with a high degree of control over the hardware. Today, significant parts of software infrastructure, including databases, browsers, multimedia frameworks, and GUI toolkits, are written in C++.
This book starts by introducing C++ data structures and how to store data using linked lists, arrays, stacks, and queues. In later chapters, the book explains the basic algorithm design paradigms, such as the greedy approach and the divide-and-conquer approach, which are used to solve a large variety of computational problems. Finally, you will learn the advanced technique of dynamic programming to develop optimized implementations of several algorithms discussed in the book.
By the end of this book, you will have learned how to implement standard data structures and algorithms in efficient and scalable C++ 14 code.
John Carey
A composer and pianist, John Carey's formal education is almost exclusively based within the musical realm. Having used computers and other forms of technology extensively in his artistic endeavors, he invested years of self-study in the subjects of programming and mathematics and now works professionally as a software engineer. He believes his unusual background provides him with a unique and relatively non-academic perspective on the topic of software development. He currently works for Hydratec Industries, a company that primarily develops CAD software for fire sprinkler system designers that is used to perform hydraulic calculations on proposed designs so as to determine their efficacy and legality.
Shreyans Doshi
Shreyans graduated with a Bachelor of Technology degree in Computer Engineering from Nirma University, Ahmedabad. After graduation, he joined the finance industry to work on ultra-low latency trading systems using cutting-edge C++ applications. For the past three years, he has been designing trading infrastructure in C++.
Payas Rajan
Payas graduated with a Bachelor of Technology degree in Computer Science from NIT Allahabad. Later, he joined Samsung Research India, where he helped develop the multimedia framework for Tizen devices. Currently working as a teaching and research assistant while pursuing a PhD specializing in geospatial databases and route planning algorithms at the University of California Riverside, he has been creating applications using C++ for a decade.
By the end of this book, you will be able to:
Build applications using hash tables, dictionaries, and setsImplement a URL shortening service using a bloom filterApply common algorithms such as heapsort and merge-sort for string data typesUse C++ template metaprogramming to write code librariesExplore how modern hardware affects the actual runtime performance of programsUse appropriate modern C++ idioms such as std::array, instead of C-style arraysThis book is intended for developers or students who want to revisit basic data structures and algorithm design techniques. Although no mathematical background is required, some basic knowledge of complexity classes and Big O notation, along with a qualification in an algorithms course, will help you get the most out of this book. Familiarity with the C++ 14 standard is assumed.
This book uses a practical and hands-on approach to explain various concepts. Through exercises, the book shows that different data structures that theoretically should perform similarly actually perform quite differently on modern computers. The book does not delve into any theoretical analyses and instead focuses on benchmarking and practical results.
For the optimal student experience, we recommend the following hardware configuration:
Any entry-level PC/Mac with Windows, Linux, or macOS is sufficientProcessor: Intel Core 2 Duo, Athlon X2, or betterMemory: 4 GB RAMStorage: 10 GB available spaceYou'll also need the following software installed in advance:
Operating system: Windows 7 SP1 32/64-bit, Windows 8.1 32/64-bit, or Windows 10 32/64-bit, Ubuntu 14.04 or later, or macOS Sierra or laterBrowser: Google Chrome or Mozilla FirefoxAny modern compiler and IDE (optional) that supports the C++ 14 standard.Before you embark on this book, install the following libraries used in this book. You will find the steps to install these here:
Installing Boost libraries:
Some exercises and activities in the book require the Boost C++ libraries. You can find the libraries, as well as the installation instructions, on the following links:
Windows: https://www.boost.org/doc/libs/1_71_0/more/getting_started/windows.html
Linux/macOS: https://www.boost.org/doc/libs/1_71_0/more/getting_started/unix-variants.html
Copy the code bundle for the class to the C:/Code folder.
The code bundle for this book is also hosted on GitHub at https://github.com/TrainingByPackt/CPP-Data-Structures-and-Algorithm-Design-Principles.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
By the end of this chapter, you will be able to:
Describe the importance of using the right data structure in any applicationImplement various built-in data structures, depending on the problem, to make application development easierImplement a custom linear data structure suited for given situations if the ones provided by C++ are not good enough for the use caseAnalyze real-life problems where different types of linear data structures are helpful and decide which one will be the most suitable for a given use caseThis chapter describes the importance of using the right data structures in any application. We will learn how to use some of the most common data structures in C++, as well as built-in and custom containers, using these structures.
