Skip to content

Latest commit

 

History

History

problem-set-3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

NBA Finals

Dictionaries

Read the NBA finals CSV data into one more more data structures as needed to complete the following:

  • Write a function that takes as an argument a year and returns the winner of the NBA finals that year.
  • Write a function that takes as an argument a team name and returns an array of all of the years the team has won the NBA finals.
  • Which teams have made it to the NBA finals but have never won?
  • Print out a ranking of who has won the MVP more than once, by times won, e.g. this output: - 6 times: Michael Jordan - 3 times: Shaquille O'Neal, LeBron James - 2 times: ...

Top movies

This is a CSV that we recommend parsing with a CSV parsing library (versus parsing it yourself).

Questions

  • What movies on this list were distributed by DreamWorks?
  • What is the highest grossing movie from Universal Pictures, domestically?
  • What distributor has the most films on this list?
  • What is the earliest year on this list, and what were the films from that year?
  • What is the distribution of ratings? (How many are PG, PG-13, R, etc.?)

Billboard Hot 100 (from 2000)

A CSV containing the Billboard Hot 100 data for every week of 2000:

  • Print out all of the #1 songs and the artists who made them. If a song was #1 for more than one week, only print it once. Example output: These were the number one songs of 2000: "Try Again" - Aaliyah "Say My Name" - Destiny's Child "What A Girl Wants" - Christina Aguilera "Maria Maria" - Santana Featuring The Product G&B "Smooth" - Santana Featuring Rob Thomas "Independent Women Part I" - Destiny's Child

  • What song was the #1 song for the most weeks of 2000, who was the artist, and how many weeks was it at #1?

  • What artist had the most songs chart in 2000, and what were those songs?

  • What song(s) were on the charts (anywhere on the charts) for the most weeks of 2000?

Bigger wordplay questions

The questions after this section are all real 60-minute interview questions from tech companies. Before you move on to those questions, we recommend confirming that you are comfortable independently breaking down, implementing, and debugging the questions below.

If you aren’t, work with your mentor on more similarly-sized questions until you are consistently able to solve them independently, before moving on.

  • What is the longest word where no letter is used more than once?
  • What are all of the words that are at least 8 letters long and use 3 or fewer different letters? For example, “REFERRER” is an answer to this question, because it uses only 3 different letters: R, E, and F.
  • What are all of the words that have at least 3 different double letters? For example, “BOOKKEEPER” is an answer to this question because it has a double-O, a double-K, and a double-E.
  • Write a function that takes a string availableLetters as an argument and returns an array of all of the words that can be made from only those letters. Letters can be re-used as many times as needed and can appear in any order. Not all of the letters in availableLetters have to be used.
  • What are all of the compound words? These are words made up of 2 smaller words. For example, “SNOWMAN” is a compound word made from “SNOW” and “MAN”, and “BEACHBALL” is a compound word made from “BEACH” and “BALL”.
  • Finding alphabet chains: - First, what are all of the words that have a least one “A”, one “B”, one “C”, one “D”, one “E”, and one “F” in them, in any order? - For example, “FEEDBACK” is an answer to this question - Next, is “ABCDEF” the longest alphabet chain that can be found in a word, or is there a longer chain starting somewhere else in the alphabet? Find the longest chain and the words that can be made from that chain.