Lambdas & Single Abstract Method Interfaces
Quick Tour of Java Functional Interfaces
A functional interface is an interface with just one abstract method, such as Runnable, Comparator, Callable, etc. The main benefit of functional interfaces, with the introduction of lambdas in Java 8, is that they allow you to pass behavior (code) to a function the same way you’d pass data (objects) to a method. This means we can pass a lambda expression when a method is accepting a functional interface. Since there is only one function to override, it is possible to infer which function to implement when using a lambda expression.
Finishing your thoughts since... you started typing
Typeahead System
A little background
An autocomplete system, also called typeahead, is a feature often experienced by users while typing in a search bar (or your IDE for that matter). The software suggests the rest of a word or word sequence based on what the user has already typed.

These suggestions can be ranked depending on how often/popular a search is. Remember that gorgeous Versace dress J-Lo wore for the Grammy Awards back in 2000? Everyone googled it - in fact it became the most popular search query at the time and - fun fact - prompted Google engineers to develop the image search! The objective is to make user searches more efficient and reduce the amount of typing required, while keeping the suggestions relevant with current search trends.
No Huff and Puff—Just Compress!
The Huffman’s Algorithm
The Huffman’s algorithm was born in 1952 as a way to perform a lossless compression on data files. Its efficiency comes from the frequency analysis of characters present in the text to encode: shorter codes are used to encode more frequent characters while longer codes are used to encore less frequent ones.
It constitutes the foundation of modern text compression.
You can read more on variable-length encoding and tree representations under the Design tag on this blog.