Search by Algolia
An introduction to transformer models in neural networks and machine learning
ai

An introduction to transformer models in neural networks and machine learning

What do OpenAI and DeepMind have in common? Give up? These innovative organizations both utilize technology known as transformer models ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What’s the secret of online merchandise management? Giving store merchandisers the right tools
e-commerce

What’s the secret of online merchandise management? Giving store merchandisers the right tools

As a successful in-store boutique manager in 1994, you might have had your merchandisers adorn your street-facing storefront ...

Catherine Dee

Search and Discovery writer

New features and capabilities in Algolia InstantSearch
engineering

New features and capabilities in Algolia InstantSearch

At Algolia, our business is more than search and discovery, it’s the continuous improvement of site search. If you ...

Haroen Viaene

JavaScript Library Developer

Feature Spotlight: Analytics
product

Feature Spotlight: Analytics

Analytics brings math and data into the otherwise very subjective world of ecommerce. It helps companies quantify how well their ...

Jaden Baptista

Technical Writer

What is clustering?
ai

What is clustering?

Amid all the momentous developments in the generative AI data space, are you a data scientist struggling to make sense ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is a vector database?
product

What is a vector database?

Fashion ideas for guest aunt informal summer wedding Funny movie to get my bored high-schoolers off their addictive gaming ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Unlock the power of image-based recommendation with Algolia’s LookingSimilar
engineering

Unlock the power of image-based recommendation with Algolia’s LookingSimilar

Imagine you're visiting an online art gallery and a specific painting catches your eye. You'd like to find ...

Raed Chammam

Senior Software Engineer

Empowering Change: Algolia's Global Giving Days Impact Report
algolia

Empowering Change: Algolia's Global Giving Days Impact Report

At Algolia, our commitment to making a positive impact extends far beyond the digital landscape. We believe in the power ...

Amy Ciba

Senior Manager, People Success

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve
e-commerce

Retail personalization: Give your ecommerce customers the tailored shopping experiences they expect and deserve

In today’s post-pandemic-yet-still-super-competitive retail landscape, gaining, keeping, and converting ecommerce customers is no easy ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Algolia x eTail | A busy few days in Boston
algolia

Algolia x eTail | A busy few days in Boston

There are few atmospheres as unique as that of a conference exhibit hall: the air always filled with an indescribable ...

Marissa Wharton

Marketing Content Manager

What are vectors and how do they apply to machine learning?
ai

What are vectors and how do they apply to machine learning?

To consider the question of what vectors are, it helps to be a mathematician, or at least someone who’s ...

Catherine Dee

Search and Discovery writer

Why imports are important in JS
engineering

Why imports are important in JS

My first foray into programming was writing Python on a Raspberry Pi to flicker some LED lights — it wasn’t ...

Jaden Baptista

Technical Writer

What is ecommerce? The complete guide
e-commerce

What is ecommerce? The complete guide

How well do you know the world of modern ecommerce?  With retail ecommerce sales having exceeded $5.7 trillion worldwide ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Data is king: The role of data capture and integrity in embracing AI
ai

Data is king: The role of data capture and integrity in embracing AI

In a world of artificial intelligence (AI), data serves as the foundation for machine learning (ML) models to identify trends ...

Alexandra Anghel

Director of AI Engineering

What are data privacy and data security? Why are they  critical for an organization?
product

What are data privacy and data security? Why are they critical for an organization?

Imagine you’re a leading healthcare provider that performs extensive data collection as part of your patient management. You’re ...

Catherine Dee

Search and Discovery writer

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit
e-commerce

Achieving digital excellence: Algolia's insights from the GDS Retail Digital Summit

In an era where customer experience reigns supreme, achieving digital excellence is a worthy goal for retail leaders. But what ...

Marissa Wharton

Marketing Content Manager

AI at scale: Managing ML models over time & across use cases
ai

AI at scale: Managing ML models over time & across use cases

Just a few years ago it would have required considerable resources to build a new AI service from scratch. Of ...

Benoit Perrot

VP, Engineering

How continuous learning lets machine learning  provide increasingly accurate predictions and recommendations
ai

How continuous learning lets machine learning provide increasingly accurate predictions and recommendations

What new data points have you learned lately? Learning is never ending (hence the phrase “lifelong learning”), so chances are ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Looking for something?

facebookfacebooklinkedinlinkedintwittertwittermailmail

Thanks to all of those that helped Santa by participating in our ❄️  2021 Coding Challenge ❄️  for the Holiday season!

Congratulations to everyone who submitted answers, but especially to our prize winner – Ruben Quintero! 🥳

For the rest of this post, I’ll be walking through solutions for each of the challenges using Ruben’s repositories as examples.

Let’s get started!

Challenge #1 🎤

Santa is a huge Star Trek fan. He remembers his favorite Star Trek actor once gave a Ted talk with an inspiring rating between 800 and 900 that was tagged storytelling.

What is the name of the speaker, (who is also a famous Star Trek actor), that Santa is going to visit?

The Ted Talks data set has several interesting attributes for faceting. The trick here is choosing which ones to facet (tags and inspiring_rating).

For this solution, Ruben uses the InstantSearch library for vanilla JS. A searchable RefinementList allows Santa to find the “storyteller” tag while a RangeInput filter allows him to set the appropriate range for the insipiring_rating.

We narrow the search down to two records, one of which is George Takei, who was an actor on the original Star Trek series (hurray for Sulu!).

Bonus Question

What is the most viewed TED Talk tagged for both collaboration and society?

 “How to spot a liar”

Challenge #2 📽

As he prepares for his trip Santa remembers that little Bryan, one of the children on his “nice” list, has asked for a movie that stars both the actor he plans to visit and the actress Amy Poehler. Santa needs another search interface to find the title of this movie (and when it was released).

What is the title and release year of the movie that Bryan wants for Christmas? (Submit via Form)

The Movies data set is too large for the Algolia free tier, so we need to use a hosted version. It’s important to remember that much of the configuration around faceting and relevance occurs within the index itself, not in the query. Since we don’t manage this index, we need to use the facets and searchable attributes as configured.

For this solution, Ruben again uses a searchable RefinementList for actors. This makes it very easy to find the movie “Free Birds” released in 2013. Ruben adds a RefinementList for genres and a Menu of release years to solve the bonus question.

Bonus Question

What is the title and score of the highest rated movie with the genre Crime released in 2008? 

7.88854034451496 for “The Dark Knight”

Challenge #3 🍷

What is the name of the Bordeaux wine from the Fronsac domain released in the same year as the movie in Challenge #2?

We start with the Wine data set, which suffers from some duplicate record issues. Each wine is in the data set 16 times! As Bryan and I discovered doing this challenge live, we need to de-dupe the data as we import it into the index.

Once the data is normalized, we just need to add a couple of RefinementLists for year and domain to discover the only wine from the Fronsac region bottled in 2013 is Chateau Vrai Canon Bouche.

Bonus Question

What was the highest rated wine under $30 from 2010?

Chateau Ferran

Challenge #4 🛩

Wine in hand, Santa is ready to start his journey. But where? He knows his favorite Star Trek actor recently made the following flights:

  • ATL → SEA
  • AHN → LGA
  • JFK → MCN

What is the major US city closest to all three flights listed above?

For this challenge, we use the Airports data set, but we need to combine it with map data to answer the question. Ruben chose to use the InstantSearch geoSearch widget. This widget uses the Google Maps APIs to render map data. But we can also use a custom connector for other mapping APIs.

Filtering on the airport codes above, we discover that although there are two well-known airports near New York City (LGA and JFK), there are actually three airports near Atlanta, GA (ATL, AHN, and MCN) making that the best answer.

Bonus Question

What is the closest airport to Carson National Forest in the United States?

Los Alamos Airport (LAM)

Challenge #5 🎸

Santa remembers another gift he still needs to pick up for a girl on his “nice” list. All little Julie wanted for Christmas were tickets to see the musician that played in that same city sometime between August 14 and August 18, 2019.

What was the name of the artist Julie wants to see for Christmas?

The Concert data set is again too large for the Algolia free tier, so we need to use the hosted version. This challenge is all about dates. As Bryan and I discovered in our live coding session, dates are hard.

Algolia indices store dates as Unix timestamps for filtering and ranking. We need to build an interface that makes it easier for humans to deal with these dates. We chose to use a date range picker from the Algolia Code Exchange. From there, it was just a few filters to find out the artist was Grimes playing at Cellairis Amphitheatre at Lakewood, Atlanta, GA.

Bonus Question

What was the last city where the band Coldplay performed in 2018?

Paris, France

Conclusion 🎄

Thanks to all of the amazing participants in the winter Coding Challenge. We’ll be keeping the Discord server up, so let us know if you want access. Even though the contest is over, these are still fun challenges to try to build on your own.

Happy holidays from all of us at Algolia and we’ll see you in the New Year! 🎊

Check out related solutions on our open source code exchange platform.

About the author
Chuck Meyer

Sr. Developer Relations Engineer

githubtwitter

Recommended Articles

Powered byAlgolia Algolia Recommend

Algolia Coding Challenge: Help Santa get inspired! 🎅
engineering

Julie Reboul
Chuck Meyer

Julie Reboul &

Chuck Meyer

Inside the Engine Part 8: Handling Advanced Search Use Cases
engineering

Julien Lemoine

Co-founder & former CTO at Algolia

Algolia's top 10 tips to achieve highly relevant search results
product

Julien Lemoine

Co-founder & former CTO at Algolia