▶Book Description
Data structures and algorithms are more than just theoretical concepts. They help you become familiar with computational methods for solving problems and writing logical code. Equipped with this knowledge, you can write efficient programs that run faster and use less memory.
Hands-On Data Structures and Algorithms with Kotlin book starts with the basics of algorithms and data structures, helping you get to grips with the fundamentals and measure complexity. You'll then move on to exploring the basics of functional programming while getting used to thinking recursively. Packed with plenty of examples along the way, this book will help you grasp each concept easily. In addition to this, you'll get a clear understanding of how the data structures in Kotlin's collection framework work internally.
By the end of this book, you will be able to apply the theory of data structures and algorithms to work out real-world problems.
▶What You Will Learn
⦁ Understand the basic principles of algorithms and data structures
⦁ Explore general-purpose data structures with arrays and linked lists
⦁ Get to grips with the basics of stacks, queues, and double-ended queues
⦁ Understand functional programming and related data structures
⦁ Use performant searching and efficient sorting
⦁ Uncover how Kotlin's collection framework functions
⦁ Become adept at implementing different types of maps
▶Key Features
⦁ Learn about important data structures such as lists, arrays, queues, and stacks
⦁ Design custom algorithms for real-life implementations
⦁ Identify suitable tools for different scenarios and deliver immediate results
▶Who This Book Is For
If you're a Kotlin developer who wants to learn the intricacies of implementing data structures and algorithms for scalable application development, this book is for you.
▶What this book covers
⦁ Chapter 1, A Walk Through – Data Structures and Algorithms, examines the basic definition of data structures and algorithms, how we can classify them, and their importance.
⦁ Chapter 2, Arrays – First Step to Grouping Data, dives deep into the most basic data structure, called an array. We will look at different types of arrays, and how to create and use them with some examples.
⦁ Chapter 3, Introducing Linked Lists, covers different topics on linked lists, their types, and how to implement these different types. It offers a guide on when to use these lists, and how they are different from vectors or lists.
⦁ Chapter 4, Understanding Stacks and Queues, covers topics related to stacks and queues, how to implement them using arrays, and their use cases. We will start by introducing stacks, then see how to create them using arrays, with some examples showing operations we can make on stacks. Then, we will introduce the queue data structure to the reader, and show them how to implement different types of queues using arrays.
⦁ Chapter 5, Maps – Working with Key-value Pairs, examines different types of map data structure and when each one is useful. Then, we will implement custom maps to show the reader how they can achieve it.
⦁ Chapter 6, Deep-Dive into Searching Algorithms, considers algorithms. Since we have already learned a lot of basic data structures, we will be now be introduced to a few algorithms to understand how they can be used to do some operations on those data structures in a more efficient way. We will cover our first and most important operation on different data structures (that is, searching) in this chapter, and also explain different types of searching techniques.
⦁ Chapter 7, Understanding Sorting Algorithms, explains how to sort a collection of items, and outlines why and when they should be sorted. Then, we will learn different techniques for sorting.
⦁ Chapter 8, Collections and Data Operations in Kotlin, introduces the collection framework provided by Kotlin and explains its usage to make your work much easier.
⦁ Chapter 9, Introduction to Functional Programming, introduces the reader to the functional style of writing programs and explains why this is beneficial. We will introduce functional data structures, along with arrow, the functional companion to the Kotlin standard library.