Consider a matrix where each cell contains either a or a . Any cell containing a is called a filled cell. Two cells are said to be connected if they are adjacent to each other horizontally, vertically, or diagonally. In…
You will be given an array of integers and a target value. Determine the number of pairs of array elements that have a difference equal to a target value. For example, given an array of [1, 2, 3, 4] and a target value…
Lauren has a chart of distinct projected prices for a house over the next several years. She must buy the house in one year and sell it in another, and she must do so at a loss. She wants to minimize her financial loss…
The city of Gridland is represented as an matrix where the rows are numbered from to and the columns are numbered from to . Gridland has a network of train tracks that always run in straight horizontal lines along a…
Hackerland is a one-dimensional city with houses aligned at integral locations along a road. The Mayor wants to install radio transmitters on the roofs of the city's houses. Each transmitter has a fixed range meaning it…