public static void main(String args[]) {
        SearchForRange searchForRange = new SearchForRange();
        int[] nums = {0, 1, 1, 3, 6, 9, 11};
        int[] r = searchForRange.searchRange(nums, 11);
        System.out.println(r[0] + " " + r[1]);
        r = searchForRange.searchRange(nums, 0);
        System.out.println(r[0] + " " + r[1]);
    }
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