Solutions to HackerRank challenges in functional paradigm using Java 8 part 1

The solution to HackerRank Sock Merchant challenge

Nasim Salmany
Nov 5 · 3 min read

Sock Merchant

pairs of socks

John works at a clothing store. He has a large pile of socks that he must pair by color for sale. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching…

Nasim Salmany

Written by

Software developer

The Startup

Medium's largest active publication, followed by +542K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade