In the game of Factor Solitaire, you start with the number 1, and try to change it to some given target number n by repeatedly using the following operation. In each step, if c is your current number, you split it into two positive factors ……
There is a binary tree with l leaves (1 ≤ l ≤ 50) where each leaf k has an amount of nutrients nk (1 ≤ nk ≤ 10000) that it produces.
The branches (which you can think of as edges) of this binary tree limit the maximum amount of nutrients that can flow to the root of the tree. You have X gr……
for each vertex v in G.V:
v.d = ∞
s.d = 0
push s into Q
while Q is not empty:
pop u from Q
for each edge (u, v) in G.E:
if u.d + w(u, v) < v.d then:
v.d = u.d + w(u, v)
if v is not in Q th……
For your birthday, you were given an airport.
The airport has G gates, numbered from 1 to G.
P planes arrive at the airport, one after another. You are to assign the ith plane to permanently
dock at any gate 1, . . . , g i (1 ≤ g i ≤ G), at which no previous plane has d……
A school team is trying to assign jerseys numbered 1, 2, 3, . . . , J to student athletes. The size of
each jersey is either small (S), medium (M) or large (L).
Each athlete has requested a specific jersey number and a preferred size. The athletes will not be
satisfied with a ……
Your boss has asked you to add up a sequence of positive numbers to determine how much money
your company made last year.
Unfortunately, your boss reads out numbers incorrectly from time to time.
Fortunately, your boss realizes when an incorrect number is read and says “zero”, ……
You are walking by a row of K (4 ≤ K ≤ 25) lights, some of which are on and some of which are
off. In this initial configuration, there is no consecutive sequence of four lights that are on.
Whenever four or more consecutive lights are on, the lights in that consecutive block w……
You have a pet Fox who loves treats. You have N neighbours at distinct locations (described as
points on the Cartesian plane) which hand out treats to your pet Fox, and each neighbour has an
unlimited number of treats to give out. The origin (which is where the Fox starts) will……