Data Interview Qs - Data Interview Questions: Problem #62

American Football Scoring
Python Algorithms

There are a few ways we can score in American Football:

  • 1 point - After scoring a touchdown, the team can choose to score a field goal
  • 2 points - (1) after scoring touchdown, a team can choose to score a conversion, when the team attempts to score a secondary touchdown or (2) an uncommon way to score, a safety is score when the opposing team causes the ball to become dead
  • 3 points - If no touchdown is scored on the possession, a team can attempt to make a field goal
  • 6 points - Awarded for a touchdown

Given the above, let's assume the potential point values for American Football are:

  • 2 points - safety
  • 3 points - only field goal
  • 6 points - only touchdown
  • 7 points - touchdown + field goal
  • 8 points - touchdown + conversion

Given a score value, can you write a function that lists the possible ways the score could have been achieved?

For example, if you're given the score value 10, the potential values are:

  • 8 points (touchdown + conversion) + 2 points (safety)
  • 6 points (only touchdown) + 2x2 points (safety)
  • 7 points (touchdown + field goal) + 3 points (only field goal)
  • 5x2 points (safety)
  • 2x2 points (safety) + 2x3 points (only field goal)

Solution for premium users will be provided using Python.




Want the solutions? Upgrade to premium to access detailed solutions to each problem (including this one, as well as the questions you've previously received).

Was this email forwarded to you? You can join our list here to receive questions


Unsubscribe

Older messages

Data Interview Questions: Problem #61

Wednesday, August 26, 2020

Data Interview Qs Twitch content creators SQL Database Querying You are working for a company like Twitch.tv. Twitch.tv is a live streaming platform, where content creators (eg the people creating

Data Interview Questions: Problem #53

Tuesday, August 25, 2020

Data Interview Qs Reddit comment activity SQL Database Querying Suppose you're working for Reddit as an analyst. Reddit is trying to optimize its server allocation per subreddit, and you've

Data Interview Questions: Problem #55

Tuesday, August 25, 2020

Data Interview Qs Rolling 9s for $50 Statistics Probability Theory Expected Value Suppose you are playing a game where there are two fair six-sided dice, and every time you roll the dice and they add

Data Interview Questions: Problem #57

Tuesday, August 25, 2020

Data Interview Qs Student GPA SQL Database Querying Provided the following tables, write a SQL query to pull the average GPA (grade_point in table) by subject for completed classes. Table 1:

Data Interview Questions: Problem #59

Tuesday, August 25, 2020

Data Interview Qs Judging smiles Statistics Box Plot Data Visualization External Dataset It's often hypothesized (and backed in some studies) that smiling can increase leniency, or reduce the

You Might Also Like

📧 EF Core Migrations: A Detailed Guide

Saturday, May 18, 2024

​ EF Core Migrations: A Detailed Guide Read on: m​y website / Read time: 10 minutes BROUGHT TO YOU BY ​ Low-code Framework for .NET Devs ​ Introducing Shesha, a brand new, open-source, low-code

Slack is under attack … and you don’t want that

Friday, May 17, 2024

Plus: OpenAI is not aligned with its Superalignment team View this email online in your browser By Christine Hall Friday, May 17, 2024 Good afternoon, and welcome back to TechCrunch PM. We made it to

Ilya Sutskever leaves OpenAI - Weekly News Roundup - Issue #467

Friday, May 17, 2024

Plus: Apple is close to using ChatGPT; Microsoft builds its own LLM; China is sending a humanoid robot to space; lab-grown meat is on shelves but there is a catch; hybrid mouse/rat brains; and more! ͏

SWLW #599: Surfing through trade-offs, How to do hard things, and more.

Friday, May 17, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

💾 There Will Never Be Another Windows XP — Why Ray Tracing is a Big Deal in Gaming

Friday, May 17, 2024

Also: What to Know About Google's Project Astra, and More! How-To Geek Logo May 17, 2024 Did You Know The very first mass-manufactured drinking straw was made of paper coated in wax; the straw was

It's the dawning of the age of AI

Friday, May 17, 2024

Plus: Musk is raging against the machine View this email online in your browser By Haje Jan Kamps Friday, May 17, 2024 Image Credits: Google Welcome to Startups Weekly — Haje's weekly recap of

Daily Coding Problem: Problem #1444 [Medium]

Friday, May 17, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Yahoo. Recall that a full binary tree is one in which each node is either a leaf node,

(Not) Sent From My iPad

Friday, May 17, 2024

The future of computing remains frustrating (Not) Sent From My iPad By MG Siegler • 17 May 2024 View in browser View in browser I tried. I really did. I tried to put together and send this newsletter

iOS Dev Weekly - Issue 661

Friday, May 17, 2024

What's the word on everyone's lips? 🅰️👁️ View on the Web Archives ISSUE 661 May 17th 2024 Comment Did you catch Google I/O this week? It's Always Interesting to see what the Android

Your Google Play recap from I/O 2024

Friday, May 17, 2024

Check out all of our latest updates and announcements Email not displaying correctly? View it online May 2024 Google Play at I/O 2024 Check out the Google Play keynote to discover the latest products