What is the most common number of dimples on a golf ball?

What is the most common number of dimples on a golf ball?

A golfer’s worst enemy may be divots, but his or her best friend may be dimples. It is the dimples on a golf ball that send it sailing farther down the fairway. There’s a finite amount of space on the surface of a golf ball. According to the official rules, a golf ball has a diameter of just 1.68 inches. But just how many of those little dimples are on the surface of a golf ball? A standard golf ball typically features 336 dimples, although it’s worth mentioning that this number can vary slightly depending on the specific design and brand of the ball.

What is the most common number of dimples on a golf ball?

336

 

How many zeros are in a quadrillion?

How many zeros are in a quadrillion?

The number quadrillion consists of one followed by fifteen zeros. It can be written as 1,000,000,000,000,000. If you’re looking for a mnemonic, the root word, quad, “four” from the Latin quadri, refers to the number of groups of three zeroes that follow one thousand. We write numbers with commas separating sets of three zeros so that it’s easier to read and understand the value. One quadrillion is also equal to 1,000 trillion. After a quadrillion, we have one quintillion, sextillion, septillion, and octillion, and so on until we reach Graham’s number, which is currently the largest known number.

12
15
18
21

The correct answer is 15.

Which U.S. marathon provides the most prize money to the winner?

Which U.S. marathon provides the most prize money to the winner?

The Boston Marathon is the oldest marathon in the world and attracts top international athletes with record-breaking prize money. The total prize purse is a whopping $850,000, which has been sponsored by John Hancock Financial since 1986. There is a bonus prize of $50,000 for breaking the world best time, and $25,000 for breaking the course record. The most rewarded Boston runner of all time was four times champion Robert Kipkoech Cheruiyot, a Kenyan runner who has earned a total of $469,000 from his victories in Boston.

  • Boston
  • Chicago
  • New York
  • Honolulu

The correct answer is Boston

The Boston Marathon is unique in that it is a qualifying race, which means that runners must meet certain time standards in order to be eligible to compete. This requirement ensures that the field of runners is highly competitive and that only the best athletes are able to participate.

The only U.S. president with a Ph.D. led the country during which war?

The only U.S. president with a Ph.D. led the country during which war?

Woodrow Wilson is the only president with a Ph.D. and the only political scientist to have served as president. Wilson studied law at the University of Virginia and earned his Ph.D. in political science and history at Johns Hopkins University. A member of the Democratic Party, Wilson served as the president of Princeton University and as the governor of New Jersey before becoming the 28th president of the United States. After a policy of neutrality at the outbreak of war in Europe, Wilson led America through World War I to “make the world safe for democracy.”

World War I
Korean War
World War II
Vietnam War

The correct answer is World War I.

Which of these actors has NEVER portrayed Abraham Lincoln?

Which of these actors has NEVER portrayed Abraham Lincoln?

Abraham Lincoln in film is not new. For decades, Hollywood has tried to capture the fascinating life of the 16th President. Acclaimed method actor Daniel Day-Lewis gave a meticulously crafted performance as the politician in Steven Spielberg’s epic historical drama Lincoln. The 2012 film was nominated for 12 Academy Awards; Spielberg won Best Director, and Day-Lewis won Best Actor. Other famous actors who have channeled Honest Abe on television or film include Gregory Peck, Kris Kristofferson, Sam Waterston, and Henry Fonda.

Henry Fonda
Gregory Peck
Charlton Heston
Daniel Day-Lewis

The correct answer is Charlton Heston.

Which baseball hero died in a plane crash on his way to deliver relief supplies to earthquake victims?

Which baseball hero died in a plane crash on his way to deliver relief supplies to earthquake victims?

The baseball hero who died in a plane crash on his way to deliver relief supplies to earthquake victims was Roberto Clemente. Clemente was a Puerto Rican professional baseball player who had a successful career with the Pittsburgh Pirates. He was known for his exceptional playing skills and his humanitarian efforts.

Roberto Clemente was a Puerto Rican professional baseball player who played 18 seasons for the Pittsburgh Pirates. He won four National League batting titles and became the 11th Major League player to record 3,000 hits. Also renowned for his humanitarian work, Roberto Clemente died in a plane crash on December 31, 1972, en route to bringing supplies to survivors of an earthquake in Nicaragua. He was posthumously inducted into the National Baseball Hall of Fame in 1973, becoming the first Latino player to be enshrined.

In 1972, a devastating earthquake struck Nicaragua, causing widespread damage and loss of life. Clemente, who had a personal connection to the country, decided to organize a relief effort to help the victims. He arranged for a plane to deliver supplies to Nicaragua and decided to accompany the flight himself to ensure that the supplies reached their destination.

Unfortunately, the plane encountered difficulties shortly after takeoff and crashed into the ocean. Clemente and everyone on board were killed. His death was widely mourned, both in the world of baseball and beyond, as he was remembered not only for his talent on the field but also for his commitment to helping others.

The correct answer is Roberto Clemente.

Count the Number of Complete Components solution leetcode

Count the Number of Complete Components solution leetcode

You are given an integer n. There is an undirected graph with n vertices, numbered from 0 to n - 1. You are given a 2D integer array edges where edges[i] = [ai, bi] denotes that there exists an undirected edge connecting vertices ai and bi.

Return the number of complete connected components of the graph.

connected component is a subgraph of a graph in which there exists a path between any two vertices, and no vertex of the subgraph shares an edge with a vertex outside of the subgraph.

A connected component is said to be complete if there exists an edge between every pair of its vertices.

Count the Number of Complete Components solution leetcode

Example 1:

Input: n = 6, edges = [[0,1],[0,2],[1,2],[3,4]]
Output: 3
Explanation: From the picture above, one can see that all of the components of this graph are complete.

Example 2:

Input: n = 6, edges = [[0,1],[0,2],[1,2],[3,4],[3,5]]
Output: 1
Explanation: The component containing vertices 0, 1, and 2 is complete since there is an edge between every pair of two vertices. On the other hand, the component containing vertices 3, 4, and 5 is not complete since there is no edge between vertices 4 and 5. Thus, the number of complete components in this graph is 1.

 

Constraints:

  • 1 <= n <= 50
  • 0 <= edges.length <= n * (n - 1) / 2
  • edges[i].length == 2
  • 0 <= ai, bi <= n - 1
  • ai != bi
  • There are no repeated edges.

Maximum Number of Moves in a Grid solution leetcode

Maximum Number of Moves in a Grid solution leetcode

You are given a 0-indexed m x n matrix grid consisting of positive integers.

You can start at any cell in the first column of the matrix, and traverse the grid in the following way:

  • From a cell (row, col), you can move to any of the cells: (row - 1, col + 1)(row, col + 1) and (row + 1, col + 1) such that the value of the cell you move to, should be strictly bigger than the value of the current cell.

Return the maximum number of moves that you can perform.

Maximum Number of Moves in a Grid solution leetcode

Example 1:

Input: grid = [[2,4,3,5],[5,4,9,3],[3,4,2,11],[10,9,13,15]]
Output: 3
Explanation: We can start at the cell (0, 0) and make the following moves:
- (0, 0) -> (0, 1).
- (0, 1) -> (1, 2).
- (1, 2) -> (2, 3).
It can be shown that it is the maximum number of moves that can be made.

Example 2:


Input: grid = [[3,2,4],[2,1,9],[1,1,7]]
Output: 0
Explanation: Starting from any cell in the first column we cannot perform any moves.

 

Constraints:

  • m == grid.length
  • n == grid[i].length
  • 2 <= m, n <= 1000
  • 4 <= m * n <= 105
  • 1 <= grid[i][j] <= 106

Neighboring Bitwise XOR solution leetcode

Neighboring Bitwise XOR solution leetcode

0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary array original of length n.

Specifically, for each index i in the range [0, n - 1]:

  • If i = n - 1, then derived[i] = original[i] ⊕ original[0].
  • Otherwise, derived[i] = original[i] ⊕ original[i + 1].

Given an array derived, your task is to determine whether there exists a valid binary array original that could have formed derived.

Return true if such an array exists or false otherwise.

  • A binary array is an array containing only 0’s and 1’s

Neighboring Bitwise XOR solution leetcode

Example 1:

Input: derived = [1,1,0]
Output: true
Explanation: A valid original array that gives derived is [0,1,0].
derived[0] = original[0] ⊕ original[1] = 0 ⊕ 1 = 1 
derived[1] = original[1] ⊕ original[2] = 1 ⊕ 0 = 1
derived[2] = original[2] ⊕ original[0] = 0 ⊕ 0 = 0

Example 2:

Input: derived = [1,1]
Output: true
Explanation: A valid original array that gives derived is [0,1].
derived[0] = original[0] ⊕ original[1] = 1
derived[1] = original[1] ⊕ original[0] = 1

Example 3:

Input: derived = [1,0]
Output: false
Explanation: There is no valid original array that gives derived.

 

Constraints:

  • n == derived.length
  • 1 <= n <= 105
  • The values in derived are either 0’s or 1’s

Find the Losers of the Circular Game solution leetcode

Find the Losers of the Circular Game solution leetcode

There are n friends that are playing a game. The friends are sitting in a circle and are numbered from 1 to n in clockwise order. More formally, moving clockwise from the ith friend brings you to the (i+1)th friend for 1 <= i < n, and moving clockwise from the nth friend brings you to the 1st friend.

The rules of the game are as follows:

1st friend receives the ball.

  • After that, 1st friend passes it to the friend who is k steps away from them in the clockwise direction.
  • After that, the friend who receives the ball should pass it to the friend who is 2 * k steps away from them in the clockwise direction.
  • After that, the friend who receives the ball should pass it to the friend who is 3 * k steps away from them in the clockwise direction, and so on and so forth.

In other words, on the ith turn, the friend holding the ball should pass it to the friend who is i * k steps away from them in the clockwise direction.

The game is finished when some friend receives the ball for the second time.

The losers of the game are friends who did not receive the ball in the entire game.

Given the number of friends, n, and an integer k, return the array answer, which contains the losers of the game in the ascending order.

Find the Losers of the Circular Game solution leetcode

Example 1:

Input: n = 5, k = 2
Output: [4,5]
Explanation: The game goes as follows:
1) Start at 1st friend and pass the ball to the friend who is 2 steps away from them - 3rd friend.
2) 3rd friend passes the ball to the friend who is 4 steps away from them - 2nd friend.
3) 2nd friend passes the ball to the friend who is 6 steps away from them  - 3rd friend.
4) The game ends as 3rd friend receives the ball for the second time.

Example 2:

Input: n = 4, k = 4
Output: [2,3,4]
Explanation: The game goes as follows:
1) Start at the 1st friend and pass the ball to the friend who is 4 steps away from them - 1st friend.
2) The game ends as 1st friend receives the ball for the second time.

 

Constraints:

  • 1 <= k <= n <= 50