Skip to Content
Functional Programming in Java
book

Functional Programming in Java

by Pierre-Yves Saumont
January 2017
Intermediate to advanced
472 pages
14h 42m
English
Manning Publications
Content preview from Functional Programming in Java

Chapter 11. Solving real problems with advanced trees

This chapter covers

  • Avoiding stack overflow with self-balancing trees
  • Implementing the red-black tree
  • Creating functional maps
  • Designing a functional priority queue

In the previous chapter, you learned about the binary tree structure and basic tree operations. But you saw that to fully benefit from trees, you must either have very specific use cases, such as handling randomly ordered data, or a limited data set, in order to avoid any risk of stack overflows. Making trees stack-safe is much more difficult than it is for lists, because each computing step involves two recursive calls, which makes it impossible to create tail-recursive versions.

In this chapter, we’ll study two specific ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Functional Programming in Java

Functional Programming in Java

Venkat Subramaniam
Learning Java Functional Programming

Learning Java Functional Programming

Richard M Reese, Richard M. Reese

Publisher Resources

ISBN: 9781617292736Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link