otobrglez / compression-puzzle

Attempts to crack the "compression puzzle".
15 stars 47 forks source link

Add Java implementations (requires JDK 11+) #51

Closed plevart closed 2 years ago

plevart commented 2 years ago

Here are some Java implementations (mainly using Stream API)

plevart commented 2 years ago

Actually, JDK 14+ is required (and JDK 17 LTS is recommended) since some implementations use Java feature called "records" which was introduced in JDK 14.

plevart commented 2 years ago

Added asserts to tests as per "Basic rules" (https://github.com/otobrglez/compression-puzzle#basic-rules)

otobrglez commented 2 years ago

Hey @plevart!

Thank you for taking the time and looking into this solution. I haven't done "pure Java" in a while and it was a refreshing perspective and I enjoyed reading it!

P.s.: Do make sure that you also check some of the other solutions.

Have a lovely day!