You are browsing the archive for 2011 May.

A Distance Maximizing Problem

May 19, 2011 in Uncategorized

Given an array A of integers, find the maximum of j-i subjected to the constraint of A[i] < A[j].

Read the rest of this entry →

Longest Substring Without Repeating Characters

May 16, 2011 in string

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for “abcabcbb” is “abc”, which the length is 3. For “bbbbb” the longest substring is “b”, with the length of 1.

Read the rest of this entry →

Determine If Two Rectangles Overlap

May 12, 2011 in Uncategorized

Given two axis-aligned rectangles A and B. Write a function to determine if the two rectangles overlap.

Read the rest of this entry →