Find longest unique substring | Lowe's Interview Question