From 8e5cc39cb6d18fc703507af9af7d22e7ca180da1 Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez Date: Mon, 9 Oct 2017 13:38:11 -0400 Subject: [PATCH] Add lonely number problem --- algorithms/array.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/algorithms/array.md b/algorithms/array.md index feadbedd..336db8ca 100644 --- a/algorithms/array.md +++ b/algorithms/array.md @@ -56,3 +56,5 @@ Arrays - Given an array, return the length of the longest increasing contiguous subarray. - E.g., `[1, 3, 2, 3, 4, 8, 7, 9]`, should return `4` because the longest increasing array is `[2, 3, 4, 8]`. - [Source](http://blog.gainlo.co/index.php/2017/02/02/uber-interview-questions-longest-increasing-subarray/). +- Given an array of integers where every value appears twice except one, find the single, non-repeating value. Do so with a running time of O(1). + - E.g., `[2, 5, 3, 2, 1, 3, 4, 5, 1]` returns 4, because it is the only value that appears in the array only once.