C005 Ashwathamas!

You have to know the Mahabharat to appreciate this one:

There are two kinds of Ashwathama’s in this world-   नरोवा कुन्जरोवा.

P-009 maximal subarray

Here is nice twist to an old problem:

Find the subarray with a maximal sum in a circular array of integers. Note the Array A[n] wraps around, so a subarray A[i,j] with i > j is also valid; one counts i, i+1, …, n, 1, …, j.

The first reaction is, why isnt A[1,n] maximal? But that doesn’t work because some elements may be negative integers.

See Also http://en.wikipedia.org/wiki/Maximum_subarray_problem

C004 More Ad attacks

1. Turning a shortcoming into a virtue:

ADATTACK: A middle-aged woman gets a young man into her bedroom, gets his help in pushing her bed just under an air-conditioner, and then shows him the door. A voice extols the virtues of an AC that only cools the air near you.

ADDEFNSE: yeah, right. that works as long as you push your bed just under the AC. Looks like an underpowered conditioner whichever way you look at it.

2. Mumbo-Jumbo sells

ADATTACK: A simple ad for a fluorescent tubelight, but with a bold claim to cutting edge tech: “made with hydraulic technology”
.

ADDEFNSE: Wow, hydraulic technology! must be truly advanced! Like, they actually wash the tubes with water. Or use hydraulic jacks to lift them.