Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Functional Data Structures and Algorithms

You're reading from   Learning Functional Data Structures and Algorithms Learn functional data structures and algorithms for your applications and bring their benefits to your work now

Arrow left icon
Product type Paperback
Published in Feb 2017
Publisher Packt
ISBN-13 9781785888731
Length 318 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
 S. Khot S. Khot
Author Profile Icon S. Khot
S. Khot
 Mishra Mishra
Author Profile Icon Mishra
Mishra
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Learning Functional Data Structures and Algorithms
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Why Functional Programming? FREE CHAPTER 2. Building Blocks 3. Lists 4. Binary Trees 5. More List Algorithms 6. Graph Algorithms 7. Random Access Lists 8. Queues 9. Streams, Laziness, and Algorithms 10. Being Lazy - Queues and Deques 11. Red-Black Trees 12. Binomial Heaps 13. Sorting

Summary


We looked at lists, the basic data structures used for functional programming. We had a detailed look at how list algorithms work in the immutable, side-effect-free functional world.

We saw the notion of a persistent data structure wherein the original version of the data structure is never mutated. Instead, we created a new structure, reflecting the change. We saw many cases of node insertion and removal for both lists and binary trees.

All of this copying could be thought of as too expensive. However, as we saw, we shared as many nodes as possible with the original data structure. We need to copy nodes only when we need to preserve the original version.

We implemented lists in Scala with the view of studying persistence and sharing. We implemented some functional list algorithms to better understand the fundamental concepts at play. In the rest of the book, we will use Scala's immutable lists.

Hope you have enjoyed the journey so far. Let's continue the fun ride and look at binary...

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 $15.99/month. Cancel anytime
Visually different images