Leetcode 743. Network Delay Time

Description

Origin Problem

There are N network nodes, labelled 1 to N.

Given times, a list of travel times as directed edges times[i] = (u, v, w), where u is the source node, v is the target node, and w is the time it takes for a signal to travel from source to target.

Now, we send a signal from a certain node K. How long will it take for all nodes to receive the signal? If it is impossible, return -1.

Read More

An Interesting Problem - The Game Of Gumdrops

Description

This problem is from my Discrete Mathematics Course.

In the game of gumdrops, two players are on alternative turns with Player 1 going first. The player has to choose any gumdrop on a grid with arbitrary width and length on each turn. The player then eats the gumdrop as well as all gumdrops above and to the right of it. The player who is forced to eat the poisoned lower-left corner one loses.

Read More