public int[] searchRange(int[] nums, int target) {
        int first = firstOccurence(nums, target);
        if (first == -1) {
            return new int[]{-1, -1};
        }
        int last = lastOccurence(nums, target);
        return new int[]{first, last};
    }
Date 07/31/2016
@author Tushar Roy

Given a sorted array of integers, find the starting and ending position of a given target value.

Time complexity O(logn)
Space complexity O(1)

https://leetcode.com/problems/search-for-a-range/
src/com/interview/binarysearch/SearchForRange.java