public boolean search(String v){  
        int low = 0;
        int high = a.size() - 1;
        while (low <= high){
            int mid = (low + high) / 2;
            int diff = a.get(mid).compareTo(v);

            if (diff == 0) 
                return true;
            else if (diff < 0)
                low = mid + 1;
            else
                high = mid - 1;         
        }
        return false;
    }