<commit_before><commit_msg>Search In A rotated arry<commit_after>class Solution {
public:
    int search(int A[], int n, int target) {
        int low = 0;
        int high = n - 1;
        while (low <= high) {
            int mid = (low+high) / 2;
            if (A[mid] == target) {
                return mid;
            }
            if (A[mid] >= A[low]) {
                if (target >= A[low] && target < A[mid]) {
                    high = mid - 1;
                } else {
                    low = mid + 1;
                }
            } else {
                if (target > A[mid] && target <= A[high]) {
                    low = mid + 1;
                } else {
                    high = mid - 1;
                }
            }
        }
        return -1;
    }
};
{'fraction_non_alphanumeric': 0.1277139208173691, 'fraction_numerical': 0.010217113665389528, 'mean_word_length': 0.8578199052132701, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6326256', 'n_tokens_mistral': 239, 'n_tokens_neox': 220, 'n_words': 63}