Fanatics Code assessment

Posted
4 Dec 2025
444 reads

Summary

I completed a code assessment for Fanatics where I was tasked with creating an ASCII chart display program based on a given set of data points.

How it went

I was given a code assessment for Fanatics. The task involved writing a program that could display an ASCII chart from a given dataset of (x, y) coordinates. The chart needed to show the surrounding components and mark each data point with an asterisk. I also had to consider the max_x and max_y values, either provided or calculated, to properly scale the chart. The example provided illustrated an online auction graph with time on the x-axis and price on the y-axis.

Questions asked (1)

  1. 01

    ASCII Chart Display Program

    Data Structures & Algorithms

    Write a program in the requested language that will display an ASCII chart given the following data:

    data = {(1,2), (2, 3), (3, 1), (4, 6), (5, 8)}

    You should be able to print the surrounding components of the chart and then place an * where each data point is specified in the data set. You do not need to print the X and Y legends, but that would be helpful. You are given the max x and max y but if you can calculate that it would be helpful.

    Example Output Structure:

         +-----+-----+-----+-----+-----+-----
         +                             *     +
         +                                   +
         +                       *           +
       $ +                                   +
         +                                   +
         +           *                       +
         +     *                             +
         +                 *                 +
         +-----+-----+-----+-----+-----+-----+
                       time
    

    Given Parameters:

    • max_x = 5
    • max_y = 8
    • data = {{1,2}, {2, 3}, {3, 1}, {4, 6}, {5, 8}}

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Fanatics recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!